An Entrepreneur, Coach, IT Consultant, Strategic Adviser, and a Traveler craving to explore and contribute to forming a better society.

Thursday, August 20, 2009

Shell Scripting #0011 - Search and Replace in a File - SED Command

No comments :
Search and Replace in a File

sed -e "/a_word_in_a_line/s/pattern_to_search/replace_string/g" x

a_word_in_a_line --> any word to be searched in a line
s --> means to search
pattern_to_search --> pattern to be searched for
replace_string --> replacing string for the pattern found
g --> globally

Featured Blog Topics:

No comments :