Re: `pwd' returns a dot

2015-09-16 Thread Chet Ramey
On 9/16/15 3:51 AM, ziyunfei wrote: > $ 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 Thanks for the report. I'll take a look. Chet -- ``The ly

Re: `pwd' returns a dot

2015-09-16 Thread Stephane Chazelas
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/..

RE: `pwd' returns a dot

2015-09-16 Thread Le Manh Cuong
When variable PWD changed, the behavior of pwd is unspecified http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pwd.html#tag_20_97_08 -- Mr. LE Manh CuongMobile: +84 1216 181090Skype: manhcuongle> From: 446240...@qq.com > Subject: `pwd' returns a dot > Date: Wed, 16 Sep

`pwd' returns a dot

2015-09-16 Thread 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