#!/bin/csh -f
# First Line of a Script
# Execute C shell.
#!/bin/sh Execute Bourne shell. (BSD only)
#!/bin/csh -f Fast C shell startup (BSD only)
unset echo
set afile = ""
set aoption = "off"
if ($#argv == 0) then
goto help
endif
if($#argv < 2 || $#argv > 2) then
echo "usage: $0 infile outfile"
exit 1
endif
if(! -f $1) then
echo "$0: $1: No such file or directory"
exit 1
endif
while (( $#argv > 0 ) )
set i = $1
switch ($i)
case -file:
shift
set afile = $1
breaksw
case -option :
set aoptoin = "on"
breaksw
endsw
shift
end
if ($afile != "" ) then
if ( ! -f $afile ) then
echo "Error: cannot find drc deck '$afile'"
exit 1
else
@ i=1;
while($i<= $#file)
echo $file[$i] >> $outfile
@ i++
end
endif
else
echo "Error: please specify filename"
goto help
endif
echo "Done..."
exit 0
help:
cat <<EOF
usage: arg.csh [options] -file filename
EOF
exit 0 |