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? ;-)
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:
Post Comments (Atom)

0 comments:
Post a Comment