#!/usr/bin/env etsh : : etsh - " Force sh(1), csh(1), and other shells to exit w/ error! " <'' ;;; : : " @(#)$Id: 04a47e4007e0c334eb5225d47ed42e80a15e8dd4 $ " : : " The author of this file, J.A. Neitzel , " : " hereby grants it to the public domain. " : : : " If $0 == lf, alias `lf ...' to `ls -F [options] [file ...]'. " : " If $0 == li, alias `li ...' to `ls -i [options] [file ...]'. " : " If $0 == ll, alias `ll ...' to `ls -AlF [options] [file ...]'. " : : " Check for correct usage. " : >>$0'' <'' : >>$1'' <'' ; : >>$2'' <'' ; : >>$3'' <'' : >>$4'' <'' ; : >>$5'' <'' ; : >>$6'' <'' : >>$7'' <'' ; : >>$8'' <'' ; : >>$9'' <'' if ! { nametest $0 lf } -a ! { nametest $0 li } -a ! { nametest $0 ll } \ if { exit } perror $0 '"Invalid name - try lf, li, or ll instead"' if $# = # if { exit } perror $0 '"tsh: Invalid shell - etsh(1) required"' if $# = 0 -a { nametest $0 lf } if { exit } ls -F if $# = 0 -a { nametest $0 li } if { exit } ls -i if $# = 0 -a { nametest $0 ll } if { exit } ls -AlF trap : 2 3 setenv ETSHDIR /tmp/list-$u-$$ if ! { mkdir -m 0700 $d } if { exit } false if { nametest $0 lf } echo -n ls -F >$d/output if { nametest $0 li } echo -n ls -i >>$d/output if { nametest $0 ll } echo -n ls -AlF >>$d/output : Loop : >>$1'' <'' echo -n \ \'$1\' >>$d/output ; shift if $# != 0 goto Loop echo >>$d/output <$d/output ( rm -r $d ; etsh - )