LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: Disabled
shell scripting


hello,

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

regards,
shenbaga.
 
Old 05-05-2005, 04:15 AM   #2
NetSnake
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
|2ainman
Member
 
Registered: Mar 2004
Distribution: Slackware current, DSL 0.9.2
Posts: 133

Rep: Reputation: 15
http://www.tldp.org/LDP/abs/html/index.html
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:52 PM.

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