Skip to content

Instantly share code, notes, and snippets.

@pete911
Last active October 4, 2015 05:18
Show Gist options
  • Save pete911/2584428 to your computer and use it in GitHub Desktop.
Save pete911/2584428 to your computer and use it in GitHub Desktop.
count lines in a file
# sed
sed -n '$=' file
# awk
wc -l file | awk '{print $1}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment