
# Listing 1: Bill Rosenblatt's pushd
#!/bin/ksh
 
dirname=$1
if [[ -d $dirname && -x $dirname ]]; then
   cd $dirname
   DIRSTACK="$dirname ${DIRSTACK:-$PWD}"
   print "$DIRSTACK"
else
   print "still in $PWD."
fi
# end listing 1

