SLUG Mailing List Archives
RE: [SLUG] script question
- To: "Jamie Wilkinson" <jaq@xxxxxxxxxxxxxx>, "SLUG List" <slug@xxxxxxxxxxx>
- Subject: RE: [SLUG] script question
- From: Bernhard Luder <bl@xxxxxxxxxxx>
- Date: Mon Jul 30 13:51:02 2001
No, that's not what I mean. I know grep -v will match everything but.
What I need is:
if [a log file] does not contain "0% packet loss" specifically then do
something (eg. restart interface) otherwise do nothing.
I have no idea how to express this in a command. How will I get a command
executed, if the log file does not contain "0% packet loss" specifically?
This electronic mail is solely for the use of the addressee and may contain
information that is confidential or privileged. If you receive this
electronic mail in error, please delete it from your system immediately and
notify the sender by electronic mail.
From: slug-admin@xxxxxxxxxxx [mailto:slug-admin@xxxxxxxxxxx]On Behalf Of
Sent: Monday, 30 July 2001 12:49
To: SLUG List
Subject: Re: [SLUG] script question
This one time, at band camp, Bernhard L?der wrote:
>ping 22.214.171.124 > /tmp/ping-check
>if 'cat /tmp/ping-check | grep packet' "DOES NOT CONTAIN "0% packet loss"
>do restart of interface
grep -v blerg says to return all lines that don't match 'blerg'
<Balial> This port may thing it's fortified, butt I seem to be mounting
a pretty good assault
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug