#!/bin/sh # Pushes the current directory into a 'memory slot' indexed by a tag # See also 'pop' mylist="/home/noel/bin/popdirlist.txt" if [ -z "$1" ]; then echo " Syntax: push n (where n is a tag)" exit 1 fi if [ -f $mylist ]; then grep -v "^$1" $mylist > $mylist.tmp fi echo "$1 `pwd`" >> $mylist.tmp sort $mylist.tmp > $mylist rm $mylist.tmp