Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Find and replace

 
saikrishna cinux
Ranch Hand
Posts: 689
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17641
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic