perl -i -pe '
s/true/false/g;
s/^.+user-preferred.+$//g;
s/^.*(<\/cluster>.*)$/$1 xsi:nil="true">$2/g;
s/^.*(<\/machine>.*)$/$1 xsi:nil="true">$2/g;
if ($_ =~ // ) {
$ssl='on';
}
if ($_ =~ /listen-port/ and $ssl) {
$_ = undef;
$ssl= undef;
}
if ($_ =~ /
}
if ($_ =~ /<\/jta-migrat/ ) { $m = undef; $_ = undef; } ' spa/qas/config/config.xml vi spa/qas/config/config.xml
Rants and ravings of a semi-autistic developer who has a hard time remembering idiotic nonsense details. Why remember it, when you know where to find it.
Friday, October 16, 2009
Removing lines context based with -pe
Removing lines with the -pe option.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment