Pages

shell tip: dealing with weird filenames

I know its frustrating. Thank god there is the end of options list.


-bash-3.00$ cd -=test=- # nope
-bash: cd: -=: invalid option
cd: usage: cd [-L|-P] [dir]
-bash-3.00$ cd "-=test=-" # nope
-bash: cd: -=: invalid option
cd: usage: cd [-L|-P] [dir]
-bash-3.00$ cd '-=test=-' # nope
-bash: cd: -=: invalid option
cd: usage: cd [-L|-P] [dir]
-bash-3.00$ cd \-\=test\=\- # nope
-bash: cd: -=: invalid option
cd: usage: cd [-L|-P] [dir]
-bash-3.00$ cd -- -=test=- # yes
-bash-3.00$ cd ..
-bash-3.00$ rmdir -- -=test=- # yes
-bash-3.00$

No comments: