sean finney on Wed, 27 Nov 2002 10:22:08 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Variable interpolation in bash


On Wed, Nov 27, 2002 at 06:02:49AM -0500, Will Dyson wrote:
> This has been bugging me for a while now. When I am writting a bash 
> script, I often want to do something of the form:
> 
> 	COMMAND_OPTIONS="-foo -bar --long-opt-whos-arg 'has spaces'"
> 	command $COMMAND_OPTIONS baz

which seems perfectly reasonable...

> But it doesn't. Instead, I get an error from command along the lines of 
> "argument 'spaces' unrecognized", indicating that the shell has not passed 
> 'has spaces' as a single argument to command.

> Any suggestions?

could you send the script to the list?  are you sure that it's not the
program in question not parsing ares correctly or something else
being done to the variable at some point?


	sean

Attachment: pgpVtciQVIlBO.pgp
Description: PGP signature