How to use awk variable in search?
awk, shell
Solution
Correct, `awk` won't recogize variables in `/ /`. You can do:
Name="jony"
awk -v name="$Name" '$0 ~ name' file
Since `print` is `awk's` default behavior we can avoid using it here.
Problem
How to use awk variable in search? ``` Name="jony" awk -v name="$Name" '/name/ {print $0}' file ``` this will search for string `name`, not for `$Name` which is actually `jony`.