From: Jeff King Date: Sat, 04 Aug 2007 11:50:03 GMT Subject: Re: Help a sed noob Message-ID: <20070804115003.GA9716@coredump.intra.peff.net> In-Reply-To: <20070804103126.GA28402@lapse.madduck.net> On Sat, Aug 04, 2007 at 12:31:26PM +0200, martin f krafft wrote: > also sprach Nguyen Thai Ngoc Duy [2007.08.04.0122 +0200]: > > sed -ne '/^URL: */{ > > s///p > > q > > }' "$GIT_DIR/remotes/$1" > > Looks like it prints the first matching line: > > grep '^URL: *' | head -1 No, it prints everything _except_ "URL: *" from the first matching line. -Peff