Thread search & replace in Textfile (15 answers)
Opened by futhark at 2010-11-23 18:31

topeg
 2010-11-23 22:04
#143012 #143012
User since
2006-07-10
2611 Artikel
BenutzerIn

user image
Sicher geht das kürzer, ist nur kein schönes Perl:
Code (perl): (dl )
1
2
3
4
5
#!/usr/bin/perl
my $file=shift || "/etc/inittab";
(@ARGV,$/)=($file);
$_=<>; s/remount,ro,noatime/remount,rw,noatime/g;
open(STDOUT, '>', $file); print;

View full thread search & replace in Textfile