#!/bin/rc # dirs - print the directory stack # fn dirs {. /bin/dirs $*} cflag=0 while(~ $1 -*){ switch($1){ case -c cflag=1 } shift } if(~ $cflag 1) dirstack=() if not echo `{pwd} $dirstack status=''