public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] About sed
@ 2005-11-07  3:44 Rafael Barreto
  2005-11-07  4:07 ` Willie Wong
  2005-11-07  7:49 ` Alexander Skwar
  0 siblings, 2 replies; 14+ messages in thread
From: Rafael Barreto @ 2005-11-07  3:44 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 909 bytes --]

Hi,

I'm learning about the use of the sed command and I have some questions. I'm
trying to read in /etc/conf.d/clock the CLOCK variable with:

sed '/^CLOCK="*"$/p' /etc/conf.d/clock

This command, in principe, must print in screen the line that contains
CLOCK= in the begin, contains anything between double quotes and ends. Well,
this doesn't return anything. If I enter the above command without $, all is
ok. But, if I would like to return just that line contains CLOCK="anything"
and nothing more? For example,

CLOCK="anything" # set clock of the system

and

CLOCK="anything"

are different.

Other thing... if i put:

sed '/^CLOCK=*/p' /etc/conf.d/clock

the return will be anything that contains CLOCK. Why?

I suppose that I didn't undestand the use of regular expression
metacharacters. So, please, anyone to explain me that?

Thanks a lot and sorry by my english...

[-- Attachment #2: Type: text/html, Size: 1049 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-11-09 11:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-07  3:44 [gentoo-user] About sed Rafael Barreto
2005-11-07  4:07 ` Willie Wong
2005-11-07  4:19   ` Rafael Barreto
2005-11-07  5:03   ` gentuxx
2005-11-07  5:38     ` Rafael Barreto
2005-11-07  5:42       ` Rafael Barreto
2005-11-07  6:37         ` gentuxx
2005-11-07  7:25           ` [gentoo-user] [OT] " Willie Wong
2005-11-07  7:19         ` [gentoo-user] " Willie Wong
2005-11-09  4:37       ` Walter Dnes
2005-11-09  8:56         ` Neil Bothwick
2005-11-07  6:55     ` Willie Wong
2005-11-07  7:35       ` gentuxx
2005-11-07  7:49 ` Alexander Skwar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox