Sed to replace string
by RameshKumar[ Edit ] 2010-01-28 06:50:57
sed 's/scripts/javascript/g' file1.txt
Opens the file file1.txt and searches for the word 'scripts' and replaces every occurrence with the word 'javascript'.
sed -n '$=' file1.txt
The above command count the number of lines in the file1.txt and output the results.