Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


Closed Thread
  Search this Thread
Old 08-05-2006, 03:36 AM   #1
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
Old 08-05-2006, 04:07 AM   #2
Senior Member
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
Please don't dual post. Your two posts were over 20min apart which makes me think they were deliberate

Rules are Here
Old 08-05-2006, 09:13 AM   #3
Registered: Jan 2006
Location: India
Distribution: Fedora 7, Linuxfromscratch 6.2
Posts: 66

Rep: Reputation: 15
sed command


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

The 'g' at the end will do it for every line where a match is found.
Old 08-05-2006, 09:30 AM   #4
Senior Member
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Closed Thread

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 5 08-03-2006 11:39 PM
SED Command racingdynamics Linux - General 4 07-25-2006 02:09 PM
sed command rharris72 Programming 6 11-20-2005 08:26 PM
sed command pazvant Linux - Software 2 05-09-2004 12:58 PM
sed command kwigibo Linux - General 3 04-21-2002 04:11 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:26 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