On Fri, Apr 08, 2005 at 12:18:05PM +0530, G. Vamsee Krishna wrote: > [EMAIL PROTECTED] ~]$ /usr/local/bin/pwd --help > Usage: /usr/local/bin/pwd [OPTION] > Print the full filename of the current working directory. > > --help display this help and exit > --version output version information and exit > > Report bugs to <bug-coreutils@gnu.org>. >
> [EMAIL PROTECTED] ~]$ pwd --help > bash: pwd: --: invalid option > pwd: usage: pwd [-PL] > > [EMAIL PROTECTED] ~]$ which pwd > /usr/local/bin/pwd > > Strange. Any idea what's going wrong? Nothing is going wrong. "pwd" is a shell built-in but a binary is also provided. The binary comes from coreutils and the builtin is part of bash (or whatever your shell is). See :- $ which pwd /bin/pwd $ echo $0 -bash $ type pwd pwd is a shell builtin $ type which which is hashed (/usr/bin/which) "which", being an external program, doesn't know that "pwd" is a shell builtin. One way of solving this (i.e. making "which" consistent) is to do this in Bash:- $ alias which="type -p" Regards, James. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils