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

Re: bash scripting question (variables and spaces)



On Tue, Mar 19, 2002 at 08:35:53PM +0100, Karsten Heymann wrote:
> Hi,
> 
> I have once again come upon bash problem I can't solve. I'm writing a
> little bash frontend and one of the programs expects a option that includes
> spaces and is composed from two other shell var's. Example:
> 
> #!/bin/bash
> A="Hello"
> B="Karsten"
> C=$A $B 
> someprog --greeting $C
> 

#!/bin/bash
A="Hello"
B="Karsten"
C="$A $B"

echo "$C"

Works fine for me.  

kent@scab:~/scratch$ ./yo2
Hello Karsten

What is your "someprog" ?
kent

-- 
To know the truth is to distort the Universe.
                      Alfred N. Whitehead (adaptation)



Reply to: