Re: problems with awk in a make file
On Tue, 17 Oct 2000, Colin Watson wrote:
> Dale Scheetz <dwarf@polaris.net> wrote:
> >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 }')
> ^^
>
> This is untested, but that's probably your problem; $ is special in
> makefiles. Try $$2 and see if that works any better.
Everyone else appears to agree with you, and it works!
Thanks for the help. I seem to learn make one nit at a time ;-)
Luck,
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: