Xref: utzoo comp.unix.questions:7374 comp.unix.wizards:9068 Path: utzoo!utgpu!water!watmath!clyde!bellcore!tness7!killer!osu-cis!tut.cis.ohio-state.edu!mandrill!gatech!udel!rochester!cornell!batcomputer!itsgw!steinmetz!uunet!yale!slb-sdr!saito From: saito@slb-sdr.UUCP (Naoki Saito) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Command line argument in Cshell script Keywords: command line argument, Cshell, string, spaces Message-ID: <497@slb-sdr.UUCP> Date: 2 Jun 88 22:34:15 GMT Followup-To: comp.unix.questions Organization: Schlumberger-Doll Research, Ridgefield, CT Lines: 38 Hello, I wrote a C-shell script to automate the task as follows: ======================================================================= # # Shell script for the plot3d for field files. # # Usage: p3d[parameters for plot3d] # set TEMP=/tmp/z if (-e $TEMP) \rm $TEMP chkf -b -d $argv[1] > $TEMP plot3d z=$TEMP -P $argv[2-] | sunplot if (-e $TEMP) \rm $TEMP exit ======================================================================= This works fine unless I use command line arguments of strings which contain space, e.g., (1) p3d fname tl="This_is_wrong" ---> OK (2) p3d fname tl="This is wrong" ---> Failed This means that in the case of (1) $argv[2] is considered as tl="This_is_wrong" but in (2) $argv[2] becomes tl="This. How can I pass the space containing arguments? Does anybody out there have solution for this? Regards, -- Naoki Saito (saito@sdr.slb.com) Schlumberger-Doll Research