Xref: utzoo comp.unix.questions:7573 comp.unix.wizards:9320 Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!princeton!udel!rochester!bbn!uwmcsd1!marque!uunet!mcvax!philmds!leo From: leo@philmds.UUCP Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Command line argument in Cshell script Keywords: command line argument, Cshell, string, spaces Message-ID: <496@philmds.UUCP> Date: 8 Jun 88 14:16:29 GMT References: <497@slb-sdr.UUCP> Reply-To: leo@philmds.UUCP (L.J.M. de Wit) Followup-To: comp.unix.questions Organization: Philips I&E DTS Eindhoven Lines: 19 In article <497@slb-sdr.UUCP> saito@slb-sdr.UUCP (Naoki Saito) writes: > Hello, I wrote a C-shell script to automate the task as follows: [stuff deleted] >plot3d z=$TEMP -P $argv[2-] | sunplot [stuff deleted] > > This works fine unless I use command line arguments of strings which >contain space, e.g., [stuff deleted] I'm not a csh expert (use a Bourne sh variant myself) but I think I can see the problem. When you start the script, you correctly quote the string argument that contains spaces. So the script gets it in its $argv[2]. However, when you execute the plot3d command from within the script, you do not quote it. Why not? I think the csh now offers the words of the strings as separate arguments to plot3d. Quote them too (in sh you would need "" so that the value of $argv[2] is used). Leo.