I have problem with command awk in bash I want to find pattern with variable, but it doesn't work. Can you tell me what's wrong with this line?
awk -F" " "/$PWD/ {print $1,$3}" file.txt
I have problem with command awk in bash I want to find pattern with variable, but it doesn't work. Can you tell me what's wrong with this line?
|
||||
Since you have been using double quotes, any Next, the awk syntax you are trying to use is You could try something like this instead:
This asks bash to replace any occurrences of |
|||||||||||||||||||||
|
$PWD
causes a syntax error. – dhag Mar 17 at 14:40