Quote:
Originally Posted by roquet
anyone know a linux program for cleaning up txt files? I tried Mobipocket Creator 4.2 in Wine and it installs ok but can't do anything with it.
|
Nearly all linux editors support "regular expressions" that are a powerful mean to clean up files. OpenOffice can also do it (there is a "regular expression" checkbox in the Find/Replace window).
The problem is to craft the right regular expression... fortunately the online help of openoffice contains a list of regular expressions that can help you. See also the manual of the grep command for a more complete reference (man grep in a console).
Other editors include vi (available on every linux box, but not graphical), gvim (graphical version of vi), sed (stream editor), and many others...
Examples in vi :
:%g/^$/d
to delete empty lines
:%s/ */ /
to replace one or more space by one space
Hope this helps,
savi.