bug-bash
[Top][All Lists]
Advanced

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

Re: command substitution and word splitting


From: Andreas Schwab
Subject: Re: command substitution and word splitting
Date: Sat, 13 Dec 2008 09:30:27 +0100
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/22.3 (gnu/linux)

"S. Sevki Dincer" <jfcgauss@gmail.com> writes:

> i want to start building a project with ./configure --prefix=... $(myflags)
> where myflags is an executable text file on my path. myflags has the
> following in it:
> printf 'CFLAGS="-O2 -fomit-frame-pointer" '
> printf 'LDFLAGS="-Wl,-O2"'
> now, when i do that ./configure complains for not recognizing
> -fomit-frame-pointer option, and actually word splitting of bash ruins
> what i wanna do. i want the word splitting of a command substitution
> "to be careful about the quotes in the resulting expansion". is that
> possible?

Use eval.

eval ./configure --prefix=... $(myflags)

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]