Article Listing 1 Listing 2 Listing 3 Listing 4 dec2005.tar

Listing 4 Our edited popd

#!/bin/ksh

DIRSTACK=${DIRSTACK#* }
if [[ -n $DIRSTACK ]]; then
    cd ${DIRSTACK%% *}
    print "$PWD"
else
    print "stack empty, still in $PWD."
fi
# end listing 4