Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site gatech.UUCP Path: utzoo!watmath!clyde!akgua!gatech!arnold From: arnold@gatech.UUCP (Arnold Robbins) Newsgroups: net.sources Subject: pushd for /bin/sh users Message-ID: <7022@gatech.UUCP> Date: Wed, 9-May-84 09:47:14 EDT Article-I.D.: gatech.7022 Posted: Wed May 9 09:47:14 1984 Date-Received: Sun, 13-May-84 00:42:05 EDT Organization: Committee to Eliminate Redundancy Committee Lines: 30 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@gatech ARPA: arnold%gatech.csnet@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