Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11493
| From | Stephane Chazelas <stephane.chazelas@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: `pwd' returns a dot |
| Date | 2015-09-16 10:46 +0100 |
| Message-ID | <mailman.1260.1442410519.19560.bug-bash@gnu.org> (permalink) |
| References | <E7A3427F-777A-48A5-999E-57884DCFEB58@qq.com> |
2015-09-16 15:51:08 +0800, ziyunfei: > $ cd / > $ PWD=. bash -c pwd > . > $ PWD=. ksh -c pwd > / > > Posix says that pwd shouldn't return the filenames dot or dot-dot. > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pwd.html Also: $ cd / $ PWD=bin/.. bash -c 'pwd; cd ..; pwd' bin/.. .. Note that POSIX is now explicit in how $PWD from the environment should be handled: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03 -- Stephane
Back to gnu.bash.bug | Previous | Next | Find similar
Re: `pwd' returns a dot Stephane Chazelas <stephane.chazelas@gmail.com> - 2015-09-16 10:46 +0100
csiph-web