Skip to content

Instantly share code, notes, and snippets.

@smirn0v
Created March 23, 2017 09:28
Show Gist options
  • Save smirn0v/5f5c9bfd3d75828c707946da8f9f189c to your computer and use it in GitHub Desktop.
Save smirn0v/5f5c9bfd3d75828c707946da8f9f189c to your computer and use it in GitHub Desktop.
Longest line in file
awk '{ if (length($0) > max) {max = length($0); maxline = $0} } END { print maxline }' FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment