Skip to main content
typo sorry
Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

For one-line strings, the GNU implementation of wc ashas a -L (a.k.a. --max-line-length) option that does exactly what you're looking for (except the control chars).

For one-line strings, the GNU implementation of wc as a -L (a.k.a. --max-line-length) option that does exactly what you're looking for (except the control chars).

For one-line strings, the GNU implementation of wc has a -L (a.k.a. --max-line-length) option that does exactly what you're looking for (except the control chars).

--max-line-length is GNU only. FreeBSD also have a -L but docs says it returns number of characters, and my tests show number of bytes.
Source Link
Stéphane Chazelas
  • 584.6k
  • 96
  • 1.1k
  • 1.7k

For one-line strings, the GNU implementation of wc as a -L (a.k.a. wc --max-line-length) option that does exactly what you're looking for (except the control chars).

For one-line strings, wc -L (a.k.a. wc --max-line-length) does exactly what you're looking for (except the control chars).

For one-line strings, the GNU implementation of wc as a -L (a.k.a. --max-line-length) option that does exactly what you're looking for (except the control chars).

Source Link
egmont
  • 6.5k
  • 1
  • 26
  • 31

For one-line strings, wc -L (a.k.a. wc --max-line-length) does exactly what you're looking for (except the control chars).