I am writing a Makefile and need to use simple awk command to parse a file.
my makefile looks like this :
Code:
SYSTEM=`cat /etc/redhat-release | awk -F" " '{ print $1 }' `
when I execute the makefile, The $1 in the awk script is substituted by make by an empty space since $1 is taken as a make variable , when it is actually a awk variable. Is there any way I can get makefile to escape resolving $1 .. I tried to escape the $1 as \$1 but then awk complains as bad command.
is there any way to this any other way ?
Thanks.
Pyro