scripting problem

Jeremy C. Reed reed at reedmedia.net
Fri Feb 16 15:02:14 MST 2007


On Fri, 16 Feb 2007, Eric "Shubes" wrote:

> For example,
> $ arglist="parm1 \"this is parm2\" parm3"
> $ command $arglist
> 
> command receives:
> $?=5 $1=parm1, $2="this, $3=is $4=parm2" $5=parm3

I get same problem with ksh (if you can call it a problem). I assume this 
is caused because "quote" processing by the shell command-line happens 
before environment variables are substituted.

> What I want command to receive is:
> $?=3 $1=parm1, $2=this is parm2, $3=parm3
> 
> How can I accomplish this?

echo $arglist | xargs yourcommand

  Jeremy C. Reed


More information about the PLUG-discuss mailing list