Skip to content

Instantly share code, notes, and snippets.

@mttjohnson
Created September 16, 2016 16:11
Show Gist options
  • Select an option

  • Save mttjohnson/bfe2c362fdabc3711f19436089b36481 to your computer and use it in GitHub Desktop.

Select an option

Save mttjohnson/bfe2c362fdabc3711f19436089b36481 to your computer and use it in GitHub Desktop.
awk examples
# recursively search for files that have pattern in them, then list the filename and line number where found
find . -type f -exec awk '/\$store_code/ {printf "%d:", FNR; print FILENAME}' {} +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment