[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pwd; docs, builtins and exec



> Reading the info page on pwd says that the command responds to --help and
> --version options. When executed on a Debian system in a bash shell, the
> builtin command refuses to accept either option. It also suggests the
> options -PL which, although accepted, seem to cause no change in the
> output.
> 
> If I 'exec pwd --version' it prints:
> 
> pwd (GNU sh-utils) 1.16
> 
> and promptly logs me out. (I assume from the "exit" it does?)

Um,  that's down to the ``exec'' which replaces the shell with pwd, which then 
exits and logs you out --- try 

   exec ls

and it too exits.

BTW my ash behaves exactly the same as bash.  Do you have a path which fails 
to include pwd when running under ash ?

Oh, just for reference:

  bash-2.01$ pwd --version
  bash: pwd: illegal option: --
  pwd: usage: pwd [-PL]
  bash-2.01$ /bin/pwd --version
  pwd (GNU sh-utils) 1.16
  bash-2.01$ ash
  $ pwd --version
  /mirror/tmp/gnome
  $ /bin/pwd --version
  pwd (GNU sh-utils) 1.16
  $ 


Cheers, Phil.



Reply to: