Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Use of sed
Date: Wed, 24 Jun 2009 09:58:59
Message-Id: 200906241156.43598.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] [OT] Use of sed by Peter Humphrey
1 On Wednesday 24 June 2009 11:34:18 Peter Humphrey wrote:
2 > On Wednesday 24 June 2009 02:36:08 Neil Bothwick wrote:
3 > > On Wed, 24 Jun 2009 00:48:07 +0100, Peter Humphrey wrote:
4 > > > I'm reduced to asking a newcomer's question: how can I make sed recurse
5 > > > down a directory tree?
6 > >
7 > > You don't, that's not sed's job, which is to edit the text you give it.
8 > >
9 > > Use find to generate a list of files for sed to work on.
10 >
11 > I'll do that. I was confused by a vague memory that there was a recursion
12 > flag somewhere, but I must have been mistaken.
13
14 sed doesn't do that.
15
16 sed takes a data stream, bashes it into shape, and outputs a (possibly
17 modified) data stream. How you get the stream in, and what you do with it once
18 it comes out, is up to you.
19
20 Possibly you were thinking of grep's recursion switch?
21
22 --
23 alan dot mckinnon at gmail dot com

Replies

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