Thanks to
Serguei Patchkovskii
Nestor Ruiz
Timothy W. Berger
Thomas M. Payerle
John Francini
Reginald Beardsley
Jim Belonis
Paul A Sand
Bob Vickers
matthias.reiter_at_de.pwcglobal.com
Paul.Casteels
Marc Baudoin
alan_at_nabeth.cxo.dec.com
Daniel Clar
MacDonell, Dennis
Marc Picard
Jim Smart
Sean O'Connell
Tyler Hall
Andrew Busch
Rich Lafferty
Peter Chapin
Dr. Tom Blinn,
Oisin McGuinness
Larry Griffith
Well, somedays it pays to stay in bed. I wish I had done so
yesterday.
Thanks for all the responses, some polite, some not so polite.
Original Question
> G'Day All,
>
> We are on DU 4.0b
>
> One of our developers has discovered that when you type "/bin/cd
> mydir" or "/usr/bin/cd mydir" to change directory, it does not
work.
> Just typing "cd mydir" works fine. This seems to be reproducible
> across all shells that I have tried (sh,csh,ksh,tcsh). The
workaround
> is obvious (don't specify the path), but does anyone have an
> explanation?
The best responses
>
/bin/cd is a bloody nonsense arising from the XPG4 requirement that
any shell built-in command should also exist as an executable image.
It has no other purpose except to ensure conformance with XPG4, so
simply ignore it.
/bin/cd operates on the process it is running in
(which is a new process spawned just to run that program), so it
doesn't affect your current shell.
cd is a shell primitive and operates in the currently running shell's
process.
/usr/bin/cd is the result of DEC carefully following a braindead
standard. A process cannot alter the current directory of its parent,
so a cd program is a total waste of time. cd has to be a shell
built-in.
Equally pointless are the programs getopts, umask, alias and various
others. They are all identical shell scripts in /usr/bin.
getopts causes a lot of confusion for /bin/sh users, because the
necessary built-in is not implemented in Bourne shell.
> Rob Wilson
>
> UNIX System Administrator/ORACLE Database Administrator
> Australian Submarine Corporation
> rawilson_at_subcorp.com.au
Received on Tue Dec 15 1998 - 01:35:16 NZDT