I just finished reading this and thought that the crowd here would be
interested in their conclusions.
It's about the possible correlation between the methods and tools used in
software development and the predictability (of delivery on time) and
quality of code (i.e. percent of critical bugs foun
Hi,
I know how to: sed -i 's/foo/bar/g' *.txt
But how do I: replace string foo to bar AND bar to foo in the same
file??
Thanks!
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/ma
Some context is missing - is it an one-shot job to be carried manually,
or do you plan to run it automatically from a script?
In principle, you first do:
egrep thirdstring *.txt
to make that the string 'thirdstring' does not exist anywhere.
A script would need a way to select another 'thirdstrin
Re:all
echo "foobar foo bar" | sed 's/foo/@foo/g; s/bar/@bar/g; s/@foo/bar/g;
s/@bar/foo/g'
based on:
http://stackoverflow.com/questions/13991017/swap-two-strings-simultaneously
found through:
https://www.google.co.il/search?q=sed+swap+foo+and+bar
חג שמח,
Eliyahu - אליהו
2013/9/25 E.S. Rosenber
Done, THANK YOU!
___
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Hi vordoo,
On Wed, Sep 25, 2013 at 2:24 PM, vordoo wrote:
> Hi,
>
> I know how to: sed -i 's/foo/bar/g' *.txt
>
> But how do I: replace string foo to bar AND bar to foo in the same file??
>
>
This is not hard to do using perl:
shlomif@telaviv1:~$ perl -ple 'my $s1 = "foo"; my $s2 = "bar";
s/(