Ralph Shumaker wrote:
> I've been compiling my script, using sed to do everything I was 
> previously doing in vim. However, I've hit a snag. One thing that works 
> in vim does *not* in sed.
> 
> vim would strip out all unwanted line feeds with:
> ":%s/\([ a-zA-Z0-9,\.:;?!)?-]\)\n\([A-Z^a-z(]\)/\1 \2/cg"
> 
> In my script,
> "sed -e 's/\([ a-zA-Z0-9,\.:;?!)?-]\)\n\([A-Z^a-z(]\)/\1 \2/g' 0035 >0036"
> doesn't change anything, so (as a test) I reduced it down to match one 
> line in particular:
> "sed -e 's/e\nu/e u/g' 0035"
> and still no go. But reducing it to:
> "sed -e 's/e$/eeeeeee/g' 0035"
> or
> "sed -e 's/^u/uuuuuuu/g' 0035"
> works (except that it does nothing to the newline).
> 
> Any suggestions?

Almost sounds like a job for perl. I will have to go back to the
original problem to see if a nice, clean perl one-liner can tend to
this.

-john


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to