[Gllug] perl script

Tom Gilbert tom at linuxbrit.co.uk
Thu Aug 22 12:10:57 UTC 2002


* David Damerell (damerell at chiark.greenend.org.uk) wrote:
> On Thursday, 22 Aug 2002, Tethys wrote:
> >To be really pedantic, I should point out that strace doesn't tell
> >you anything about whether the shell uses its builtin or /bin/echo.
> >What makes you think the shell runs /bin/echo if it's present?
> 
> In particular, this behaviour would be disastrous on proprietary
> UNIXen - like Solaris - that have a /bin/cd as mandated by SUS,
> because a non-builtin cd doesn't do anything.

Muahaha. I was not aware SUS mandated a /bin/cd. What precisely is
having a /bin/cd supposed to be good for? :)

*looks at /bin/cd on solaris:

bash-2.03$ cat /bin/cd
#!/bin/ksh
#
#ident  "@(#)alias.sh   1.1     95/02/0
#
# Copyright (c) 1995 by Sun Microsystem
#
cmd=`basename $0`
$cmd "$@"

(/bin/cd is actually hardlinked to /bin/alias), along with a bunch of
other things.

Riiiight... So /bin/cd is run by ksh and invokes the builtin cd, then
exits. That's so.... Useful....?

SUS can be braindead, at times.

Tom.
-- 
   .^.    .-------------------------------------------------------.
   /V\    | Tom Gilbert, London, England | http://linuxbrit.co.uk |
 /(   )\  | Open Source/UNIX consultant  | tom at linuxbrit.co.uk    |
  ^^-^^   `-------------------------------------------------------'

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list