Sed to replace string - Linux Views : 317
Tagged in : Linux
0 0
Send mail


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.
By RameshKumar, On - 2010-01-28



    Login to add Comments .