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

Re: problems with awk in a make file



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.

-- 
Colin Watson                                     [cjw44@flatline.org.uk]



Reply to: