Florian Kulzer wrote:
> On Wed, Mar 04, 2009 at 16:24:27 -0500, kamaraju kusumanchi wrote:
>
> [...]
>
>> Now,
>> I would like to replace all the occurrences of
>>
>> a(ijk)1b with a(ijk)23b
>> a(jik)1b with a(jik)23b
>> a(ikj)1b with a(ikj)23b
>> and so on for all the strings such as a(???)
>>
On Wed, Mar 04, 2009 at 04:24:27PM -0500, kamaraju kusumanchi wrote:
> Because of the size of the files involved, the number of files on
> which I have to perform this operation I decided to use sed (instead
> of doing it manually in vim)
Do this *manually* in vim?
There were suggestions for a n
H.S. wrote:
> Then
> $> sed -e 's/\(a(.*)\)1b/\123b/' foo.dat > foo_new.dat
>
> Or just:
> $> sed -e 's/1b/23b/' foo.dat > foo_new.dat
>
> if only 1b is to be replaced. Same thing using perl (will replace
> contents of foo.dat inplace):
> $> perl -p -i -e "s/1b/23b/g;" foo.dat
>
>
> Regards
p
On Wed, Mar 04, 2009 at 16:24:27 -0500, kamaraju kusumanchi wrote:
[...]
> Now,
> I would like to replace all the occurrences of
>
> a(ijk)1b with a(ijk)23b
> a(jik)1b with a(jik)23b
> a(ikj)1b with a(ikj)23b
> and so on for all the strings such as a(???)
>
> Because of the size of the files in
kamaraju kusumanchi wrote:
> Consider the following file.
>
>> cat junk.txt
> a(i)1b
> a(j)1b
> a(ij)1b
> a(ji)1b
> a(ijk)1b
> a(jik)1b
> a(ikj)1b
> a(jki)1b
> a(kij)1b
> a(kji)1b
>
> In general the file is very long, might contain some other text. Now,
> I would like to replace all the occurrenc
On Wed, Mar 04, 2009 at 04:24:27PM -0500, kamaraju kusumanchi wrote:
> Consider the following file.
>
> > cat junk.txt
> a(i)1b
> a(j)1b
> a(ij)1b
> a(ji)1b
> a(ijk)1b
> a(jik)1b
> a(ikj)1b
> a(jki)1b
> a(kij)1b
> a(kji)1b
>
> In general the file is very long, might contain some other text. Now,
Consider the following file.
> cat junk.txt
a(i)1b
a(j)1b
a(ij)1b
a(ji)1b
a(ijk)1b
a(jik)1b
a(ikj)1b
a(jki)1b
a(kij)1b
a(kji)1b
In general the file is very long, might contain some other text. Now,
I would like to replace all the occurrences of
a(ijk)1b with a(ijk)23b
a(jik)1b with a(jik)23b
a(i
7 matches
Mail list logo