#!/bin/sh : expand filename case "$1" in ~/*|~) echo $1 | /usr/local/bin/sed "s|~|${HOME-$LOGDIR}|" ;; ~*) if test -f /bin/csh; then /bin/csh -f -c "glob $1" failed=$? echo "" exit $failed else name=`/usr/local/bin/expr x$1 : '..\([^/]*\)'` dir=`/usr/local/bin/sed -n -e "/^${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e p -e q -e '}' &2 exit 1 fi case "$1" in */*) echo $dir/`/usr/local/bin/expr x$1 : '..[^/]*/\(.*\)'` ;; *) echo $dir ;; esac fi ;; *) echo $1 ;; esac