perl -nie "print unless /begin/../end/" file1 file2 #### perl -ni.bak -e "print unless /begin/../end/" file1 file2