[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
                      ^^
                      this is the problem... try...
  someprog --greeting "$C"

That should work, I think.

Cheers,

Brett

Attachment: pgpDHkCPEr9WG.pgp
Description: PGP signature


Reply to: