• Wincent
    Menu
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

Finding the longest line in a fileEdit

Created 6/25/2011, updated 5/18/2017
$ cat file.text | awk '{print length, $0}' | sort -nr | head -1

Source: http://wtanaka.com/node/7719

  • wiki
Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell with Rust (with help from Git and Neovim).