I have a large text file, I would like to put on my ebook reader, but the formatting all goes wrong because all the lines Columns with CR / LF are rigid wrapped on or before 80, and the paragraphs / headers are not marked separately, only one CR / LF is there.
What do I need, column 75 with one place after all CR / LF, most of these paragraphs will be persistent (not the right solution, but very good to read.)
Is it possible to do this with a regex? Preferably a Linux (Pearl) or SAD Analyzer, alternatively a Notepad ++ Regex.
perl -p -e \ / \ s + $ //; $ _ = Length () & lt; = 75? Ql {\ n}: q {} 'book.txt
Perl means the -p
option: processing for each input line, process and print The code is given with the option -e
. In this case: Remove the white space on the rear and then attach a new line or a place depending on the length of the line.
Comments
Post a Comment