fold: Pretty simple, pretty cool

I love digging around in coreutils. I’ve never found so many fun things in one package as I have with coreutils.

Here’s fold, for example.

2013-11-05-lv-r1fz6-fold

Simplest idea in the world: Basically set a right-hand border for text spillage. cat, as you probably know, just smears everything out as far as it can before jumping back to the opposite side.

fold lets you set a jump-back point, and if you flag it with -s, you get breaks at spaces.

Like I said, simplest thing in the world, but the results are gorgeous. Keep this one in your “remember for later” category. 😉

6 thoughts on “fold: Pretty simple, pretty cool

  1. Scott Hansen

    Thanks for this one! Never heard of it in 10+ Linux years! Makes it easier to quickly scan a largish CSV file without using a CSV viewer or Libreoffice.

    Scott

  2. Pingback: fmt: And the difference is. … | Inconsolation

Comments are closed.