Suppose, you have a text file called "input.txt". You want to convert all instances of "thisword" to "anotherword" and produces and output file called "output.txt".
# cat input.txt | sed 's/thisword/anotherword/g' > output.txt
Cool, huh? ;-)
Showing posts with label Sed Command. Show all posts
Showing posts with label Sed Command. Show all posts
Wednesday, November 12, 2008
A cool usage of "sed" command
,
Author: Vikas Vishnu
|
Filed Under:
Alter text from a source text file and write to an output file,
Sed Command
Subscribe to:
Posts (Atom)
