LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-05-2006, 05:00 AM   #1
ancys
LQ Newbie
 
Registered: Jul 2006
Posts: 28

Rep: Reputation: Disabled
sed command


hi all

I need ur help

In shell script(bash)
i want to replace /path/replace as /sai/test.txt using sed command

how to do this
help
 
Old 08-05-2006, 10:05 AM   #2
tbutttbutt
Member
 
Registered: Jan 2006
Location: India
Distribution: Fedora 7, Linuxfromscratch 6.2
Posts: 66

Rep: Reputation: 15
try:

sed 's/\/path\/replace/sai\/test.txt/g'

The 'g' at the end will do it for all lines.
 
Old 08-05-2006, 11:50 AM   #3
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: win 10 | OpenBSD 6.1 | Fedora 27
Posts: 252

Rep: Reputation: 78
Here is some nice sed examples.

http://sed.sourceforge.net/sed1line.txt
 
  


Reply


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
sed command ancys Programming 3 08-05-2006 10:30 AM
SED Command racingdynamics Linux - General 4 07-25-2006 03:09 PM
sed command help... Pete.Hanson@jacobs.c Programming 8 06-02-2006 06:53 PM
sed command Kalyani1 Linux - Software 28 12-07-2005 12:48 PM
sed command rharris72 Programming 6 11-20-2005 09:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:43 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration