Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-05-2005, 02:56 AM   #1
LQ Newbie
Registered: Apr 2005
Location: India
Distribution: Red Hat 8
Posts: 5

Rep: Reputation: 0
shell scripting


how can i change the string "i am" to "we are" in all its occurance in a file by a script.

Old 05-05-2005, 04:15 AM   #2
LQ Newbie
Registered: Sep 2004
Location: China
Distribution: Debian 3.0r2 unstable
Posts: 28

Rep: Reputation: 15
Just one cmd:
$sed 's/i am/we are/g' yourfile.
Old 05-05-2005, 05:12 AM   #3
Registered: Mar 2004
Distribution: Slackware current, DSL 0.9.2
Posts: 133

Rep: Reputation: 15


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
shell interface vs shell scripting? I'm confused jcchenz Linux - Software 1 10-26-2005 03:32 PM
Shell Scripting again yaadhav Linux - Newbie 8 08-04-2005 10:21 AM
shell scripting pcdebb Linux - Newbie 17 11-20-2003 03:49 PM
shell scripting markus1982 Linux - General 2 05-20-2003 07:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration