wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes Find and replace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Find and replace" Watch "Find and replace" New topic
Author

Find and replace

saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
Hi All,
Is there any way to find and replace a string in unix with out making use of external languages like perl,awk,sed ...
I am trying to make it out using tr (trnasform) command
but tr can be used only for single cracher find and repalce.

can any one help me out in this issue
Thanks
Sai Krishna


A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15629
    
  15

sed isn't any more of a language than tr is, and it's a fairly lightweight program anyway (in some distros, both programs are actually part of a bigger program named busybox.

For simple find-and-replace, sed is usually your best bet.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Find and replace
 
Similar Threads
how to deal with the HTML redirect ?
Capturing Checkbox value using spring framework
javac works, java doesn't
Find the Comma(,) in sentence
IE8 Display Block Problem