Try set cmd = "$argv[3]" j > I have a csh script that is driving me nuts - very simple: > > #!/bin/csh -f > > # accept one or three args > if ($#argv == 1) then > set start = 0 > set finish = 16 > set cmd = $argv[1] > else if ($#argv == 3) then > set start = $argv[1] > set finish = $argv[2] > set cmd = $argv[3] > else > echo "Error Usage - 1 or 3 arguments" > exit 1 > endif > > echo "start: $start finish: $finish cmd: $cmd :" > > If I invoke the script with: > > ./foo.sh 1 2 3 > > I get: > > start: 1 finish: 2 cmd: 3 : > > I thought that you could pass in a string if you double quoted is - > but if I do this: > > ./foo.sh 1 2 "foo bar baz" > > I get: > > start: 1 finish: 2 cmd: foo : > > It seems to truncate off the first word in the string for argv[3]. > Tried single quotes, no change. > > Any ideas? Doesn't have to be csh, but there is a bunch of legacy > stuff underneath this if block that I don't wanna re-write. > > Josh > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > _______________________________________________ > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota > tclug-list at mn-linux.org > http://mailman.mn-linux.org/mailman/listinfo/tclug-list >