Possible Duplicate:
external variable in awk
How do I pass this variable below?
This doesn't work:
fname=testfile.txt
lsof | awk '/deleted/&&/$fname/ {print $4}' *----no output*
While this works:
lsof | awk '/deleted/&&/testfile.txt/ {print $4}'
3r