You can test this change like this: $ mkdir -p '/tmp/foo bar/x' $ cd $(dirname "/tmp/foo bar/x") bash: cd: too many arguments $ cd "$(dirname "/tmp/foo bar/x")" $ pwd /tmp/foo bar
4.7 KiB
Executable File
4.7 KiB
Executable File