Results 1 to 4 of 4
I was attempting to write a korn shell script that would prompt a user with various questions and build the arguments for a 'make' command. I ran into a problem, ...
- 08-12-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 2
[SOLVED] korn shell and quoted arguments
I was attempting to write a korn shell script that would prompt a user with various questions and build the arguments for a 'make' command. I ran into a problem, however. The quoted arguments are being interpreted as if they had no quotes.
Currently in my script I have the following source at the end:
echo parms=${parms}
make -f sample.mk ${parms}
I run the program and the output looks like this:
parms=all C_FLAGS="-DDEV -DDEBUG"
make: Fatal error: Unkown option `-G'
If I type the following at the command line...
make -f sample.mk all C_FLAGS="-DDEV -DDEBUG"
...it works fine. If I remove the quotes, I get the same error as the script. So I'm 99% sure that the quotes are being lost/ignored.
Well, I hope I've described the problem clearly. Any ideas how to overcome this little hurdle?
Thanks in advance,
Darren
- 08-13-2010 #2Linux Newbie
- Join Date
- Mar 2009
- Posts
- 228
Just a guess, but add a 'eval' in front of the 'make' commad.
Code:eval make -f sample.mk ${parms}
- 08-13-2010 #3
Another guess would be that
just does not what you expect from it.Code:echo parms=${parms}
Why would make complain about "Unknown option`-G'" if there is no -G option?
- 08-13-2010 #4Just Joined!
- Join Date
- Aug 2010
- Posts
- 2



