Gentoo Archives: gentoo-user

From: Etaoin Shrdlu <shrdlu@×××××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Grep question
Date: Fri, 06 Mar 2009 09:36:35
Message-Id: 200903061033.59237.shrdlu@unlimitedmail.org
In Reply to: RE: [gentoo-user] Re: Grep question by Adam Carter
1 On Friday 6 March 2009, 00:01, Adam Carter wrote:
2 > > > awk '/^foo/,/^bar/' a
3 > > >
4 > > > does the same :)
5 > >
6 > > Nice...
7 >
8 > Thanks for all these answers. Interesingly when I moved the sed script
9 > (sed "s/;/\\n/g") from Linux to Solaris it failed as Solaris sed
10 > doesn't like putting the newline character as the "translated to" bit.
11 > Installing GNU sed on the Solaris box sorted that out.
12
13 Or for the future, with seds that do not like \n in the rhs, you can do
14
15 sed 's/;/\
16 /g'