Skip to main content
added 151 characters in body
Source Link
Gilles 'SO- stop being evil'
  • 865.3k
  • 205
  • 1.8k
  • 2.3k

You have to pass the $j shell variable to awk  :
 

awk -v jj="$j" '...'

Note that this assumes that the value of the variable does not contain backslashes, as the argument to awk -v jj=$j '...' undergoes backslash expansion.

You have to pass the $j shell variable to awk  :
 awk -v jj=$j '...'

You have to pass the $j shell variable to awk:

awk -v jj="$j" '...'

Note that this assumes that the value of the variable does not contain backslashes, as the argument to awk -v undergoes backslash expansion.

Source Link
magor
  • 3.9k
  • 3
  • 16
  • 30

You have to pass the $j shell variable to awk :
awk -v jj=$j '...'