Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-17 Thread Merciadri Luca
Karl Vogel wrote: >>> On Fri, 14 May 2010 19:04:42 +0200, >>> Merciadri Luca said: >>> > > M> I have many text files (actually .tex files) which contain some sequence > M> or regexp (it depends on the files) that I would like to remove. Is > M> there a commandline/GUI for doing this massiv

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Merciadri Luca
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bob McGowan writes: > On 05/14/2010 10:52 AM, Merciadri Luca wrote: >> "Boyd Stephen Smith Jr." writes: >> > ---removed on purpose--- >>> (find $dir -type f -exec sed -i -e "s/$regexp//" {} \;) for all files in a >>> directory. >> Thanks both. (@A

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Merciadri Luca
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mike McClain writes: > On Fri, May 14, 2010 at 07:04:42PM +0200, Merciadri Luca wrote: >> I have many text files (actually .tex files) which contain some >> sequence or regexp (it depends on the files) that I would like to >> remove. Is there a comma

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Merciadri Luca
Thanks for this really complete answer. I really appreciated it. Thanks for your investment in it. I learnt a lot thanks to it. Boyd Stephen Smith Jr. wrote: > On Friday 14 May 2010 12:52:45 Merciadri Luca wrote: > >> "Boyd Stephen Smith Jr." writes: >> >>> On Friday 14 May 2010 12:04:42

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Boyd Stephen Smith Jr.
On Friday 14 May 2010 12:52:45 Merciadri Luca wrote: > "Boyd Stephen Smith Jr." writes: > > On Friday 14 May 2010 12:04:42 Merciadri Luca wrote: > >> I have many text files (actually .tex files) which contain some > >> sequence or regexp (it depends on the files) that I would like to > >> remove.

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Bob McGowan
On 05/14/2010 10:52 AM, Merciadri Luca wrote: > "Boyd Stephen Smith Jr." writes: > ---removed on purpose--- >> (find $dir -type f -exec sed -i -e "s/$regexp//" {} \;) for all files in a >> directory. > Thanks both. (@Andrei: it was in the content of the file, sorry not to > have specified it bef

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Mike McClain
On Fri, May 14, 2010 at 07:04:42PM +0200, Merciadri Luca wrote: > I have many text files (actually .tex files) which contain some > sequence or regexp (it depends on the files) that I would like to > remove. Is there a commandline/GUI for doing this massive edit? > Look at sed's -i switch or Perl.

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Merciadri Luca
Bob McGowan wrote: > On 05/14/2010 10:37 AM, Boyd Stephen Smith Jr. wrote: > >> On Friday 14 May 2010 12:04:42 Merciadri Luca wrote: >> >>> I have many text files (actually .tex files) which contain some >>> sequence or regexp (it depends on the files) that I would like to >>> remove. Is th

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Bob McGowan
On 05/14/2010 10:37 AM, Boyd Stephen Smith Jr. wrote: > On Friday 14 May 2010 12:04:42 Merciadri Luca wrote: >> I have many text files (actually .tex files) which contain some >> sequence or regexp (it depends on the files) that I would like to >> remove. Is there a commandline/GUI for doing this m

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Merciadri Luca
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 "Boyd Stephen Smith Jr." writes: > On Friday 14 May 2010 12:04:42 Merciadri Luca wrote: >> I have many text files (actually .tex files) which contain some >> sequence or regexp (it depends on the files) that I would like to >> remove. Is there a comm

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Andrei Popescu
On Fri,14.May.10, 20:32:11, Andrei Popescu wrote: > On Fri,14.May.10, 19:04:42, Merciadri Luca wrote: > > Hi, > > > > I have many text files (actually .tex files) which contain some > > sequence or regexp (it depends on the files) that I would like to > > remove. Is there a commandline/GUI for doi

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Boyd Stephen Smith Jr.
On Friday 14 May 2010 12:04:42 Merciadri Luca wrote: > I have many text files (actually .tex files) which contain some > sequence or regexp (it depends on the files) that I would like to > remove. Is there a commandline/GUI for doing this massive edit? (sed -i -e "s/$regexp//" "$file") for a singl

Re: Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Andrei Popescu
On Fri,14.May.10, 19:04:42, Merciadri Luca wrote: > Hi, > > I have many text files (actually .tex files) which contain some > sequence or regexp (it depends on the files) that I would like to > remove. Is there a commandline/GUI for doing this massive edit? You need 'find'. If that sequence or re

Deleting some regexp/simple expression from lots of files in a secure way

2010-05-14 Thread Merciadri Luca
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I have many text files (actually .tex files) which contain some sequence or regexp (it depends on the files) that I would like to remove. Is there a commandline/GUI for doing this massive edit? Thanks. - -- Merciadri Luca See http://www.student.