This same kind of operation on a Unix system might look like this:
#!/bin/bash if [ $# != 1 ]; then echo "try harder" exit 1 fi pushd $1 ls popd
Manipulating your directory stack might prove to be a new favorite trick or might seem more trouble than it's worth, but many admins find it's a useful way to move between directories with ease.
Read more of Sandra Henry-Stocker's Unix as a Second Language blog and follow the latest IT news at ITworld, Twitter and Facebook.
flickr / Roberto Verzo