problems with awk in a make file
I'm having a problem that I just can't understand. I have a log file that
contains, among other things, the line:
usf-tools 0.7.00
I have a make file with the line:
SVER := $(shell grep "usf-tools" ./logfile |awk 'NR == 1 { print $2 }')
that doesn't work properly. SVER for this line is set to:
usf-tools 0.7.00
I know the awk command is executing, because I only get the first line
(grep returns every line in the file with "usf-tools" in the line)
My first response was "well this must be a quoting problem", so I tried
both "" and ''.
Using '' returns the same value as without quotes. Using "" returns
nothing.
Also, when I try the command in a shell everything works as expected, and
SVER = 0.7.00, so this is something particular to a make file...
Can anyone point to the nit that is either missing or present that makes
this fail in the make file?
Thanks,
Dwarf
--
_-_-_-_-_- Author of "The Debian Linux User's Guide" _-_-_-_-_-_-
aka Dale Scheetz Phone: 1 (850) 656-9769
Flexible Software 11000 McCrackin Road
e-mail: dwarf@polaris.net Tallahassee, FL 32308
_-_-_-_-_-_- See www.linuxpress.com for more details _-_-_-_-_-_-_-
Reply to: