Replacing a word

  • varma
  • Novice
  • Novice
  • No Avatar
  • Joined: May 28, 2004
  • Posts: 31
  • Loc: India
  • Status: Offline

Post May 26th, 2006, 5:50 am

Hi,

Good Morning,

I am new to Linux/Unix environment. Can any one tell me, how can I replace the number of occurances of a 'WORD' with another Word in a file after opening with VI Editor.

Thanks

Varma
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 26th, 2006, 5:50 am

  • Daemonguy
  • Moderator
  • Web Master
  • User avatar
  • Joined: Jan 23, 2004
  • Posts: 2675
  • Loc: Somewhere outside the box in Sarasota, FL.
  • Status: Offline

Post May 26th, 2006, 7:43 am

1,$ s/word1/new_word/g
"It's always a long day, 86,400 won't fit into a short."

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 109 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.