Gary Kline wrote:
in my manuscript, i have many places where i'ved used several
newlines to indicate a jump in time, or topic, or mood, or
<<whatever>>.  i have lost these vertical spacing in all but my
original draft.  can i use grep somehow to find these extra newlines?


if not grep, then sed, ed, or what?!

tia,

gary



Gary,

If I understand your question correctly (by no means certain), the
following may help.  This is an awk script, which will print out the
lines in the source file at which it finds more than three consecutive
empty lines.

BEGIN {
    ncnt = 0
}
/^ *$/ {
        ncnt++;
        if (ncnt > 3)
                {print "Emphasis at: " NR;
                 ncnt = 0;}
         next;
        }
       {ncnt = 0;}

You can invoke this (assuming the awk source in is a file called
"em.awk" and your original manuscript is in a file called "manuscript") by:

$ awk -f em.awk manuscript

-mark

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to