[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] The Code-Red Worm is attacking... GOD it's att acking.
- Subject: RE: [cobalt-users] The Code-Red Worm is attacking... GOD it's att acking.
- From: Dom Latter <DLatter@xxxxxxxxxxxxxxx>
- Date: Thu Jul 19 23:06:40 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> When I do this
>
> cat /var/log/httpd/access | grep .ida | wc -l
>
> I come up with simply a number:
> 213
>
> what does that mean?
Michael, please *trim* irrelevant material from your posts
(quoted sigs are especially annoying to digest-readers).
And it helps readability if you put your comments *after*
the quotes you are referring to.
Anyway: "cat" takes the named file and sends it to
standard output. The pipe "|" takes standard output
and sends it to the next program, which in this case
is grep. grep takes all lines that match ".ida"
(which as has been pointed out, includes "helloidaho"
as well as "default .ida". That is then piped into
"wc" (word count) which normally counts words, but in
this case is called with the -l switch, which makes it
counts lines.
Shimi, thanks for the heads-up on this one.