Last active
March 1, 2016 19:25
-
-
Save sagax/4c4d0cd2751b3f7c120e to your computer and use it in GitHub Desktop.
how to use shell variable in awk pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo="bar" | |
awk "/$foo/"'{print $0}' some_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment