From: "Arttu V." <arttuv69@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] [OT] Use of sed
Date: Wed, 24 Jun 2009 11:52:05 +0300 [thread overview]
Message-ID: <fecdbac60906240152n40b950ccm911d682e2d78adb3@mail.gmail.com> (raw)
In-Reply-To: <20090624023608.0bec60ca@zaphod.digimed.co.uk>
On 6/24/09, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Wed, 24 Jun 2009 00:48:07 +0100, Peter Humphrey wrote:
>> And while I'm at it, how do I change the field
>> separator from / to enable me to search on that character?
>
> By using something else, you don't need to tell sed, it works it out for
> itself, just use something that isn't in your search string, : is a good
> candidate.
If I read his question right, he asked about just the simple matchers:
//. Perl solves this problem with the optional m in front (m//), so
you can do m:/foo: or m+/foo+, but I don't know of a similar toggle
for sed (well, I'm a sed newbie, so there might still be one).
I don't even think substituting the string with itself (s+/foo+/foo+)
would work as I think s/// will succeed every time, even when it
doesn't actually substitute anything, so maybe it cannot be used for
an "if-then" in sed either?
--
Arttu V.
next prev parent reply other threads:[~2009-06-24 8:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 23:48 [gentoo-user] [OT] Use of sed Peter Humphrey
2009-06-23 23:59 ` Roy Wright
2009-06-24 1:36 ` Neil Bothwick
2009-06-24 8:52 ` Arttu V. [this message]
2009-06-24 9:34 ` Peter Humphrey
2009-06-24 9:56 ` Alan McKinnon
2009-06-24 11:03 ` Peter Humphrey
2009-06-24 11:19 ` Neil Bothwick
2009-06-24 11:28 ` Alex Schuster
2009-06-24 14:18 ` Peter Humphrey
2009-06-24 14:44 ` Alex Schuster
2009-06-24 14:49 ` Renat Golubchyk
2009-06-24 15:00 ` Paul Hartman
2009-06-24 14:55 ` [gentoo-user] " Grant Edwards
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=fecdbac60906240152n40b950ccm911d682e2d78adb3@mail.gmail.com \
--to=arttuv69@gmail.com \
--cc=gentoo-user@lists.gentoo.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