#!/usr/bin/env osh : : osh - " Force sh(1), csh(1), and other shells to exit w/ error! " <'' ;;; : : " @(#)$Id: 392ce8b4557a824bd5b917a4087f6b7f14d51965 $ " : : " 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 $n = n if { exit } perror $0 '"sh6: Invalid shell - osh(1) required"' if $n = 0 -a { nametest $0 lf } if { exit } ls -F if $n = 0 -a { nametest $0 li } if { exit } ls -i if $n = 0 -a { nametest $0 ll } if { exit } ls -AlF sigign + 2 3 setenv OSHDIR /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 $n != 0 goto Loop echo >>$d/output <$d/output ( rm -r $d ; osh - )