Strange Behaviour.
Posted 05-07-2010 at 05:55 AM by __raHulk
Tags strange
Hi Friends,
Recently I came upon a new discovery in bash shell that commands which expect input <paths> as parameters like ls, rm works even if you type multiple front slashes
eg.
rm /foo/bar/file.txt
works even if we type it as
rm /foo//bar/file.txt
or even
ls /foo/////bar///file or to my surprise
even ///foo/bar/file.txt works. Its a strange behaviour to me as I wonder why it happened. Could anyone explain it more deeply??
Or if you too come across some strange things then do share it here as everyone would love to know such things ...
Recently I came upon a new discovery in bash shell that commands which expect input <paths> as parameters like ls, rm works even if you type multiple front slashes
eg.
rm /foo/bar/file.txt
works even if we type it as
rm /foo//bar/file.txt
or even
ls /foo/////bar///file or to my surprise
even ///foo/bar/file.txt works. Its a strange behaviour to me as I wonder why it happened. Could anyone explain it more deeply??
Or if you too come across some strange things then do share it here as everyone would love to know such things ...
Total Comments 0