aspose file tools*
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 Spring in Action this week in the Spring 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: 16142
    
  21

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