sed change entire line
Here I use sed to replace the entire 2nd line in a lot of files with a new 2nd line. The shell script: for fle in `ls *.msg` do # copy file first so as can keep permissions and ownership identical cp -p $fle test_$fle # replace entire 2nd line with a new 2nd line […]
Read More sed change entire line