|
|
1.1 root 1: #!/bin/sh
2: : expand filename
3: case "$1" in
4: ~/*|~)
5: /bin/echo $1 | /bin/sed "s|~|${HOME-$LOGDIR}|"
6: ;;
7: ~*)
8: if /bin/test -f /bin/csh; then
9: /bin/csh -f -c "glob $1"
10: /bin/echo ""
11: else
12: name=`/bin/expr x$1 : '..\([^/]*\)'`
13: dir=`/bin/sed </etc/passwd -n -e "/^${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e p -e q -e '}'`
14: if /bin/test ! -d "$dir"; then
15: me=`basename $0`
16: /bin/echo "$me: can't locate home directory for: $name" >&2
17: exit 1
18: fi
19: case "$1" in
20: */*)
21: /bin/echo $dir/`/bin/expr x$1 : '..[^/]*/\(.*\)'`
22: ;;
23: *)
24: /bin/echo $dir
25: ;;
26: esac
27: fi
28: ;;
29: *)
30: /bin/echo $1
31: ;;
32: esac
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.