[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Quick LInux Quiz
Michael D. Hirsch wrote:
> Quick! What is the effect of "cd //"? I sure guessed wrong.
>
> I don't really understand what is happening when I do that on RH under bash.
> Can anyone explain this?
multiple '/' are processed as a single '/'. I did try this under bash
and it lists the current directory as '//' although it's still '/' (root).
I did not expect that. I know the original ksh, pdksh and the bourne
shell all shrink multiple '/' to a single slash, but the also properly
handle it when displaying the current directory.
I'd say it's a painless bug in bash.
--
Until later, Geoffrey Registered Linux User #108567
Building secure systems inspite of Microsoft