Re: extra slash in current path
yuyichao-mit <[email protected]> Thu, 23 Jun 2011 09:26:55 -0400
| Newsgroups | org.kernel.vger.linux-c-programming,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Well, actually, I mean why is // so special if more than two slash at the beginning of absolute path become only one slash? Yichao Yu On Thu, Jun 23, 2011 at 9:17 AM, Alessandro Suardi <[email protected]> wrote: > On Thu, Jun 23, 2011 at 3:14 PM, yuyichao-mit <[email protected]> wrote: >> The problem is like this: >> >> $ cd / >> $ pwd >> / >> >> $ cd / >> $ pwd >> // >> >> $ cd /// >> $ pwd >> / >> >> Why can there be a extra slash (and exactly one) in current path? Is >> this designed on purpose? >> This is not really a big deal but I think it can confuse some program. > > Multiple consecutive slashes should not confuse any program. > > http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266 > > --alessandro > > "There's always a siren singing you to shipwreck" > > (Radiohead, "There There") >