I don't believe that you can't substitute with grep or find.  Do you
have access to sed?

sed -e 's/abdfgg/opsmsdd/g' filename > outputfilename

If you have multiple files with text you wish to replace, then you could
use 'grep -R' to find them and if you're replacing with the same text in
each file, then you could use the sed command in a loop and replace
everything.

sed is your friend.

Hope this helps,
Andy.


-----Original Message-----
From: Jianping Zhu [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 13, 2003 8:22 AM
To: [EMAIL PROTECTED]
Subject: how to substutue string in a text file



 how to substutue string in a text file by using "gerp" or "find"?

I have a text file, lof of "abdfggg" in that text file, i need to change
it to "opsmsdd", is there a simple way to do that?

Thanks 


--------------------------------
Jianping Zhu
Department of Computer Science
Univerity of Georgia 
Athens, GA 30602
Tel 706 5423900
--------------------------------



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to