Re: sed, bash script

2003-09-18 Thread csj
At Thu, 18 Sep 2003 14:12:49 -0800, Ken Irving wrote: [...] > > sed -i -f sed_script *.foo [...] > That's nice, but the version of sed available with woody/stable > doesn't provide that option. What version are you using? > > $ sed -i > sed: invalid option -- i > Usage: sed [OPTI

Re: sed, bash script

2003-09-18 Thread Ken Irving
On Fri, Sep 19, 2003 at 05:14:15AM +0800, csj wrote: ... > > > > >>On Tue, Sep 16, 2003 at 07:39:39AM -0700, Ric Otte wrote: > > >> > > >> > > >>>Hi, I would like to run all of the files in some directories > > >>>through sed, in order to edit the files. I can do it for > > >>>individual file

Re: sed, bash script

2003-09-18 Thread csj
At Thu, 18 Sep 2003 12:16:06 +0200, Torsten Reuss wrote: > > csj wrote: > > >At Tue, 16 Sep 2003 17:08:51 +0200, > >Matthias Czapla wrote: > > > > > >>On Tue, Sep 16, 2003 at 07:39:39AM -0700, Ric Otte wrote: > >> > >> > >>>Hi, I would like to run all of the files in some directories > >>>t

Re: sed, bash script

2003-09-18 Thread Torsten Reuss
csj wrote: At Tue, 16 Sep 2003 17:08:51 +0200, Matthias Czapla wrote: On Tue, Sep 16, 2003 at 07:39:39AM -0700, Ric Otte wrote: Hi, I would like to run all of the files in some directories through sed, in order to edit the files. I can do it for individual files by typing: cat filename|se

Re: sed, bash script

2003-09-17 Thread csj
At Wed, 17 Sep 2003 11:40:31 +0100, Karsten M. Self wrote: > > on Wed, Sep 17, 2003 at 08:08:26AM +0800, csj ([EMAIL PROTECTED]) wrote: [...] > > Is there anything intrinsically wrong with: > > > > find directory -name "*.foo" | xargs sed -i -f sed_script > > Well: > >- It outputs everyth

Re: sed, bash script

2003-09-17 Thread Karsten M. Self
on Wed, Sep 17, 2003 at 04:22:15AM -0700, Ric Otte ([EMAIL PROTECTED]) wrote: > On Wed, Sep 17, 2003 at 11:40:31AM +0100, Karsten M. Self wrote: > > on Wed, Sep 17, 2003 at 08:08:26AM +0800, csj ([EMAIL PROTECTED]) wrote: > > > Is there anything intrinsically wrong with: > > > > > > find director

Re: sed, bash script

2003-09-17 Thread Karsten M. Self
on Wed, Sep 17, 2003 at 02:44:09PM +0200, Matthias Czapla ([EMAIL PROTECTED]) wrote: > On Wed, Sep 17, 2003 at 11:40:31AM +0100, Karsten M. Self wrote: > > Personally, I'd do it as: > > > > for f in $( find path -name \*.foo ) > > do sed -e 'stuff' < "$f" > "$f.tmp" && mv "$f.tmp" "$f"; d

Re: sed, bash script

2003-09-17 Thread csj
At Wed, 17 Sep 2003 11:50:15 -0800, Ken Irving wrote: > > On Wed, Sep 17, 2003 at 04:22:15AM -0700, Ric Otte wrote: > > On Wed, Sep 17, 2003 at 11:40:31AM +0100, Karsten M. Self wrote: > > > on Wed, Sep 17, 2003 at 08:08:26AM +0800, csj ([EMAIL PROTECTED]) wrote: > > > > At Tue, 16 Sep 2003 17:08:

Re: sed, bash script

2003-09-17 Thread Ken Irving
On Wed, Sep 17, 2003 at 04:22:15AM -0700, Ric Otte wrote: > On Wed, Sep 17, 2003 at 11:40:31AM +0100, Karsten M. Self wrote: > > on Wed, Sep 17, 2003 at 08:08:26AM +0800, csj ([EMAIL PROTECTED]) wrote: > > > At Tue, 16 Sep 2003 17:08:51 +0200, > > > Matthias Czapla wrote: > > > > > > > > On Tue, S

Re: sed, bash script

2003-09-17 Thread Matthias Czapla
On Wed, Sep 17, 2003 at 11:40:31AM +0100, Karsten M. Self wrote: > on Wed, Sep 17, 2003 at 08:08:26AM +0800, csj ([EMAIL PROTECTED]) wrote: > > At Tue, 16 Sep 2003 17:08:51 +0200, Matthias Czapla wrote: > > > On Tue, Sep 16, 2003 at 07:39:39AM -0700, Ric Otte wrote: > > > > Hi, I would like to run

Re: sed, bash script

2003-09-17 Thread Ric Otte
On Wed, Sep 17, 2003 at 11:40:31AM +0100, Karsten M. Self wrote: > on Wed, Sep 17, 2003 at 08:08:26AM +0800, csj ([EMAIL PROTECTED]) wrote: > > At Tue, 16 Sep 2003 17:08:51 +0200, > > Matthias Czapla wrote: > > > > > > On Tue, Sep 16, 2003 at 07:39:39AM -0700, Ric Otte wrote: > > > > Hi, I would l

Re: sed, bash script

2003-09-17 Thread Karsten M. Self
on Wed, Sep 17, 2003 at 08:08:26AM +0800, csj ([EMAIL PROTECTED]) wrote: > At Tue, 16 Sep 2003 17:08:51 +0200, > Matthias Czapla wrote: > > > > On Tue, Sep 16, 2003 at 07:39:39AM -0700, Ric Otte wrote: > > > Hi, I would like to run all of the files in some directories > > > through sed, in order t

Re: sed, bash script

2003-09-17 Thread Matthias Czapla
On Wed, Sep 17, 2003 at 08:08:26AM +0800, csj wrote: > At Tue, 16 Sep 2003 17:08:51 +0200, Matthias Czapla wrote: > > On Tue, Sep 16, 2003 at 07:39:39AM -0700, Ric Otte wrote: > > > Hi, I would like to run all of the files in some directories > > > through sed, in order to edit the files. I can do

Re: sed, bash script

2003-09-16 Thread csj
At Tue, 16 Sep 2003 17:08:51 +0200, Matthias Czapla wrote: > > On Tue, Sep 16, 2003 at 07:39:39AM -0700, Ric Otte wrote: > > Hi, I would like to run all of the files in some directories > > through sed, in order to edit the files. I can do it for > > individual files by typing: cat filename|sed c

Re: sed, bash script

2003-09-16 Thread Matthias Czapla
On Tue, Sep 16, 2003 at 07:39:39AM -0700, Ric Otte wrote: > Hi, > I would like to run all of the files in some directories through sed, in > order to edit the files. I can do it for individual files by typing: > cat filename|sed command>filename > But that requires me to run that command for eac

sed, bash script

2003-09-16 Thread Ric Otte
Hi, I would like to run all of the files in some directories through sed, in order to edit the files. I can do it for individual files by typing: cat filename|sed command>filename But that requires me to run that command for each file. I was wondering if anyone could 1) give me a reference to a