Re: Help a sed noob
- From
Jeff King <peff@peff.net>
- Date
- Aug 4, 2007, 11:50 UTC
- 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:
Show 9 quoted lines
> also sprach Nguyen Thai Ngoc Duy <pclouds@gmail.com> [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 -1No, it prints everything _except_ "URL: *" from the first matching line.
-Peff