LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-11-2005, 04:52 PM   #1
scuffell
Member
 
Registered: Jun 2004
Location: Reading, UK
Distribution: SUSE 9.1, SUSE 9.2, SUSE 9.3, Knoppix 3.8, Gentoo 2005.0, cygwn, colinux
Posts: 100

Rep: Reputation: 15
Quick sed question


Hi,

I'm using sed to replace every occurence of - t the beginning of a line with an asterisk:

sed "s/^-/\*/g"

Despite the fact that I have escaped the asterisk, it still substitutes the contents of the current directory, and doesn't just display *

I have had a look through the man pages, doesn't mention anything about this problem.

Any ideas?

Thanks
 
Old 02-11-2005, 05:02 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
that's bash giving you a headache. Use single quotes instead of double quotes.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sed question ckoniecny Linux - General 3 11-11-2005 09:31 AM
quick sed quesion DBabo Linux - Software 1 07-24-2005 01:11 PM
sed question lazyuser Programming 4 02-11-2005 06:11 AM
Quick question: quoting text in sed overbored Linux - Software 0 06-24-2004 01:23 PM
sed question zoomzoom Linux - Software 2 10-20-2003 04:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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