Reputation: 17
I'm trying to use this command in (#!/bin/bash) makefile:
grep 'svseed' tc_1/tc1.log | awk '{print $7}'
If I use this command in my terminal its working fine. But if i use it in makefile its not printing the value of $7
. I came to know that its searching for the ($7)
variable in makefile. I want that ($7)
variable to store in any other variable
How is not there in the makefile, how to solve this issue?
Is this possible or not?
Upvotes: 2
Views: 5734
Reputation: 3601
Try:
grep 'svseed' tc_1/tc1.log | awk '{print $$7}'
To escape a dollar sign in a makefile, you have to double it.
Upvotes: 5