Jump to content

Featured Replies

Posted

I have a large number of large text files I'm trying to format generally for ebook (Calibre can't do what I want), but each contains a formatting I don't know how to get around:

 

Quote:

This is a sentence in a

paragraph. This is the final sentence

in the paragraph.

Begin next paragraph.

I'd like to remove the LF at the end of only those lines NOT ending in a period. So if there's a period followed by a LF, the LF is not removed. The end result would look like this:

 

Quote:

This is a sentence in a paragraph. This is the final sentence in the paragraph.

Begin next paragraph.

I can fish around and do some things with sed and tr, but this is beyond me. I never could code, but I do okay from notes... Thanks in advance!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...