jupyter notebook python variable to bash code example
Example: jupyter notebook pass python variable to shell
dir_path = "/home/foo/bar"
!cp file1 $dir_path
dir_path = "/home/foo/bar"
!cp file1 {dir_path}
!cp file1 {dir_path + sub_dir}
dir_path = "/home/foo/bar"
!cp file1 $dir_path
dir_path = "/home/foo/bar"
!cp file1 {dir_path}
!cp file1 {dir_path + sub_dir}