On 7/14/17 7:14 AM, Kae Verens wrote:
> I'm not even sure if cd is part of Bash?

It is. It's a regular shell builtin.

> anyway - if you type any of the following:
> cd / ; pwd
> cd /// ; pwd
> cd //// ; pwd
> 
> the CLI always reports
> /
> 
> but, if you do this:
> cd // ; pwd
> 
> then the CLI reports
> //

Posix requires this behavior:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html#tag_20_14

step 8c.

Two leading slashes must be preserved, because // has implementation-
defined semantics. Any other number may be collapsed to one slash.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to