1

argv in csh

view story
linux-howto

http://www.unix.com – I have a problem that when I run my script with no arguments I get the error Code: argv: Subscript out of range. Code: #!/bin/csh set rdir = "/uniprg/chrisd/radon/trunk-radon/fradon/source-frt/new-frt" if ($#argv == 0) then     echo "no arguments passed to radon3d-linear.com"     $rdir/uniseis << EOJ     echo "no arguments passed to radon3d-linear.com"   else if ($#argv == 1) then   if ("$argv[1]" == "--valgrind") then     echo "--valgrind detected"     (HowTos)