git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>
Subject: Help a sed noob
Date: Fri, 3 Aug 2007 19:22:48 -0400	[thread overview]
Message-ID: <fcaeb9bf0708031622w25ab6e9ev61372169cfc0bd98@mail.gmail.com> (raw)

Hi,

There is a construct like this in git-parse-remote.sh which makes
busybox ash unhappy:

                sed -ne '/^URL: */{
                        s///p
                        q
                }' "$GIT_DIR/remotes/$1"

It complains about "no previous regexp" while gnu sed is ok. Can
anyone explain to me what does "s///p" do? GNU Sed info page says
nothing about empty regexp. If I replace it with "s/\(.*\)/\1/p" then
I get "URL: " along with the remote path.

By the way, can we use another construct instead? It would be less
work for me ;-)
-- 
Duy

             reply	other threads:[~2007-08-03 23:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 23:22 Nguyen Thai Ngoc Duy [this message]
2007-08-03 23:38 ` Help a sed noob 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
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=fcaeb9bf0708031622w25ab6e9ev61372169cfc0bd98@mail.gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).