Home » NO IDEA » FIND AND REPLACE

FIND AND REPLACE

Blog Stats

  • 14,863 hits
April 2013
M T W T F S S
« Mar   Oct »
1234567
891011121314
15161718192021
22232425262728
2930  

FIND AND REPLACE
echo enter file name :
read file
echo enter word to be searched :
read find
echo enter replacement word :
read replace
grep $find $file | replace $find $replace – – $file
cat $file

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: