08/06/17 10:25:04
#!/bin/csh -f
set com=$0
if ($#argv < 1 || $#argv > 3) then
echo Usage:$com start_line total_lines '[file_name]'
exit 1
endif
if ($#argv == 2) then
set s=$1
set t=$2
tail +$s | head -$t
else
set s=$1
set t=$2
set f=$3
cat $f | tail +$s | head -$t
endif
exit 0
echo ------------------
これだとエラーがでます。どなたか改良してください。お願いします。