I am trying to write a c-shell script that checks for number of arguments and echos a string, but I am getting an unexpected end of file syntax error and I don't understand why.
Here is what I tried:
if ( $#argv == 0 ) then
echo "Enter one or more args"
else
echo "Entry accepted"
endif
Later I tried to output each argument found with this:
if ( $#argv == 0 ) then
echo "Enter one or more args"
else
foreach arg ( $* )
echo "Found argument $arg"
end
endif
and got a different syntax error "unexpected token `('"
Any help is appreciated
bashto interpret a csh script. The languages are different iin a number of ways.csh foo.csh [ blah [ ..]]