On Sun, 08 Oct 2006 16:00:17 +0000, Jack Cuyler wrote: > This patch will strip out the sig and add it back in at the end (although > the latter part is commented out, as I'm not sure if that will break > anything)
And looks like I found a typo. Two, actually. > +sed -n -e '1,/-- /p' ${TEMPFILE} |\ > +grep -v ^'-- ' > ${BODYFILE} The regex should have a ^ in there, like so: +sed -n -e '1,/^-- /p' ${TEMPFILE} |\ Likewise, this > +#sed -n -e '/-- /,//p' ${TEMPFILE} >> ${BODYFILE} Should be: +#sed -n -e '/^-- /,//p' ${TEMPFILE} >> ${BODYFILE} Other than that, it should work. The first sed statement will return everything before the first line beginning with "-- " The second sed statement will return the first line beginning with "-- " and everything after. The carrots will take care of lines that contain, but don't begin with, a sig delimiter. If there is no sig delimiter, the first statement will return the entire text and the second statement will return nothing. -- Cheers, Jack NEXT TIME IT COULD BE ME ON THE SCAFFOLDING NEXT TIME IT COULD BE ME ON THE SCAFFOLDING NEXT TIME IT COULD BE ME ON THE SCAFFOLDING NEXT TIME IT COULD BE ME ON THE SCAFFOLDING Bart Simpson on chalkboard in episode 2F12 _______________________________________________ Pan-users mailing list Pan-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/pan-users