LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 06-24-2004, 01:23 PM   #1
overbored
Member
 
Registered: Jun 2003
Posts: 58

Rep: Reputation: 15
Quick question: quoting text in sed


I'm trying to quote some characters so that I can say something like "sed 's/$var//g'" from a bash script without worrying about the characters in $var being seen as regex special chars. Thanks in advance for any help.

EDIT:

Sorry, a better example should've been more like

sed "s/\b$var\b//gI"

And I want to quote just the stuff under $var.

Last edited by overbored; 06-24-2004 at 01:24 PM.
 
  


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
Delete text between key words : sed shalomajay Programming 7 05-11-2011 06:22 PM
Using sed to replace a lot of text Wynd Programming 9 10-07-2005 03:47 AM
quick sed quesion DBabo Linux - Software 1 07-24-2005 01:11 PM
Quick sed question scuffell Linux - General 1 02-11-2005 05:02 PM
[bash] cutting text with sed Erhnam Programming 3 02-11-2005 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:01 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
Open Source Consulting | Domain Registration