On Wed, 2007-10-03 at 18:52 +1000, david wrote:
> [EMAIL PROTECTED]:~/test/testdir $ cat > test
> 1 
> 2
> 3
> [EMAIL PROTECTED]:~/test/testdir $ sed s/1\n/1/g test 
> 1
> 2
> 3
> [EMAIL PROTECTED]:~/test/testdir $ 
> 
> The output I would have liked would be:
> 
> 12
> 3
> 
> but sed doesn't seem to work like that. Pity. I'm pretty sure you can't
> get vim to do it either. I'm assuming vim just uses sed anyway?

vim will do that just fine, and is pretty much my go-to when I find
myself needing to do it.

I did find a way to search/replace across newlines with sed, too, but it
made my head hurt.

-- 
Pete

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to