From: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
To: Jeff King <peff@peff.net>,
Nguyen Thai Ngoc Duy <pclouds@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Help a sed noob
Date: Sat, 04 Aug 2007 14:26:05 +0200 [thread overview]
Message-ID: <46B4705D.2010208@fs.ei.tum.de> (raw)
In-Reply-To: <20070804121811.GA1605@lapse.madduck.net>
martin f krafft wrote:
> also sprach Jeff King <peff@peff.net> [2007.08.04.1350 +0200]:
>> No, it prints everything _except_ "URL: *" from the first matching line.
>
> I am convinced we could submit this to the Obfuscated Code Contest.
> :)
This is basic sed scripting.
> The behaviour is absolutely unclear from the manpage and defies my
> logic. Can you elaborate a bit, even though this is off-topic?
-ne means "don't print, execute the following code".
/.../ should be clear, { starts a "function list"
s// is "match last regexp, so s/// is "match last regexp and replace with empty string.
flag "p" to function "s" means "print if matched"
q is "quit".
that's really straight forward and all documented in my sed(1).
cheers
simon
--
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
next prev parent reply other threads:[~2007-08-04 12:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 23:22 Help a sed noob Nguyen Thai Ngoc Duy
2007-08-03 23:38 ` Junio C Hamano
2007-08-04 0:06 ` Nguyen Thai Ngoc Duy
2007-08-03 23:40 ` René Scharfe
2007-08-04 10:31 ` martin f krafft
2007-08-04 11:50 ` Jeff King
2007-08-04 12:18 ` martin f krafft
2007-08-04 12:26 ` Simon 'corecode' Schubert [this message]
2007-08-04 13:56 ` martin f krafft
2007-08-04 14:06 ` David Kastrup
2007-08-04 12:40 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46B4705D.2010208@fs.ei.tum.de \
--to=corecode@fs.ei.tum.de \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.