in reply to Replacing Lines in 100 Gig file
can't quite figure out how to leave that last </root> alone or how to add it at the end of processing...perl -pi.bak -e 'next unless $. > 2; s{</?root>\s*}{}; s{<\?xml.*\?>\s +*}{};' foo.xml echo '</root>' >> foo.xml
|
|---|