Transcript from the "Shorten Lines" Lesson
>> James Halliday: Another fun little utility to play around with is called fold. So if you wanna format text to do things like word wrapping, you can use the fold command. So for example, going back to Moby Dick for a bit. So if we pull out the first 250 lines of Moby Dick, maybe we wanna format it so that,
>> James Halliday: Instead of these really wide columns, or instead of this really wide output, we can have it be formatted a little more narrowly, cuz sometimes that's easier to read. So we can do fold -w 30, and that uses 30 characters of width. And then, it's a little bit annoying, because it actually breaks the output in between words.
[00:00:56] So if you don't want it to do that, I think it's -sw, yeah, and that will break it on words. Of course, there's already new lines in the file, so it's kind of annoying as well. But you could use a little set expression if you want to kind of cut things up in a better way, and you can format it however you like.