Text Reformatting
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 5 lines
cat file.txt | tr -s " " "\012" > file1.txt | fmt -u -w 105 file1.txt > file2.txt
This does not maintain the paragraphs, however. Can sed do it and how?
If there's a blank line between paragraphs, it should work. Otherwise it becomes more difficult. Try opening the file in Vim and running the command
ggVG
which reformats the whole file similar to fmt. If you don't like the result, quit without saving anything:
:q!
Yawar
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs