Dave's Brain

Browse - Computer Tips - How can I wrap the lines of text in a file?

Date: 2017mar30
OS: Linux

Q.  How can I wrap the lines of text in a file?

A.  Use the fold command with -<width> like this:

fold -70 -s myfile.txt
The -s option tells it to break on spaces (which should be the default).

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.