Sed to replace string

by RameshKumar 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.

Tagged in:

1075
like
0
dislike
0
mail
flag

You must LOGIN to add comments