in reply to Wish to keep only those lines which start with letter s, and delete all other lines.
Another varient on the -pi.bak -e ("pi bake") schemata, but using the powers of the "ni bake":
perl -ni.bak -e'print if /^s/'perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^+*`^ ve^#$&V"+@( NO CARRIER'
|
|---|