Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-30-2009, 12:49 AM   #1
LQ Newbie
Registered: Apr 2009
Posts: 22

Rep: Reputation: 15
Replacing a pattern using variable?


sed 's/$ip1/$ip2/g'
Old 04-30-2009, 01:23 AM   #2
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90

i.e. use double quotes instead of single quotes.


replace, string, variables

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
bash search for a pattern within a string variable nutthick Programming 8 03-17-2015 07:26 PM
Replacing a bunch of lines between a pattern Namachivayam Programming 1 05-21-2007 07:23 PM
bash replacing characters within a variable baks Programming 5 03-19-2007 12:33 AM
Replacing a image filename with a regex pattern in a script jonaster Linux - General 1 09-05-2006 07:02 PM
replacing pattern with sed produces double realos Programming 1 10-17-2002 08:03 PM

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