Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Use of sed
Date: Wed, 24 Jun 2009 01:36:12
Message-Id: 20090624023608.0bec60ca@zaphod.digimed.co.uk
In Reply to: [gentoo-user] [OT] Use of sed by Peter Humphrey
1 On Wed, 24 Jun 2009 00:48:07 +0100, Peter Humphrey wrote:
2
3 > I'm reduced to asking a newcomer's question: how can I make sed recurse
4 > down a directory tree?
5
6 You don't, that's not sed's job, which is to edit the text you give it.
7
8 Use find to generate a list of files for sed to work on.
9
10 > And while I'm at it, how do I change the field
11 > separator from / to enable me to search on that character?
12
13 By using something else, you don't need to tell sed, it works it out for
14 itself, just use something that isn't in your search string, : is a good
15 candidate. Or you can escape the / as \/ but this quickly degenerates
16 into the leaning matchstick appearance so beloved of Perl scripters.
17
18
19 --
20 Neil Bothwick
21
22 Windows Error #01: No error... ...yet.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] [OT] Use of sed "Arttu V." <arttuv69@×××××.com>
Re: [gentoo-user] [OT] Use of sed Peter Humphrey <peter@××××××××××××××.org>