pushd for /bin/sh users
Arnold Robbins
arnold at gatech.UUCP
Wed May 9 23:47:14 AEST 1984
The following shell file implements the 'pushd' command for people who
prefer /bin/sh to /bin/csh. There is no associated 'popd' command, instead
you just hand the new shell a control-d (EOF). Here it is:
: pushd -- 'push' a directory onto the 'stack' for the Bourne shell
dir=`pwd`
if cd $1
then
pwd
if test "$SHELL" != ""
then
$SHELL
else
/bin/sh
fi
cd $dir
echo
pwd
fi
--
Arnold Robbins
CSNET: arnold at gatech
ARPA: arnold%gatech.csnet at csnet-relay.arpa
UUCP: ...!{akgua, allegra, rlgvax, sb1, ut-sally}!gatech!arnold
"All this digital stuff is just a fad. Analog is the way to go."
-- William M. Robbins, 1984
More information about the Comp.sources.unix
mailing list