How can i make something like
if (echo "$arg2" | egrep -s '^+\.+km/h+$|^+km/h+$'); then
not to output the value of $arg2 on the screen, evertime i get match it outputs the value of the variable on the screen which i don't need to do. I know for grep its -q option but it doesn't work for egrep.... (2 Replies)
Hi I've been searching google and have not found what egrep -c means. Does anyone know where I can get a cheat sheet or what that -c means?
thanks,
Linda (2 Replies)
Hello,
Why is this not returning files containing the string in the var $files?
files=`ls /dir1/dir_level2/dir_level3 | egrep "catch \["`
files=`ls /dir1/dir_level2/dir_level3` this by itself returns a list of files which I thought could be sent through grep or egrep to look for matches.
... (5 Replies)
Hi Guys,
we have a shell script which basically query the Database which retrieves huge data and use the data with "egrep" .
Now there is some data which contains characters like "abc)" and the same is used like below :
"egrep (.+\|GDPRAB16\|GDPR/11702 96 abc)\|$ temp.txt"
now while... (7 Replies)
Executed the following if conditions .. and got different results .
only (( )) gave correct o/p with all scenarios .
Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition.
And why each condition gave different result.
1.... (2 Replies)
hi,
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
I have a text file which has the content starting with "....."
Not able to filter out lines staring with "....."
Is there anything wrong with grep stagement ??
.....processing table 2 of 2
.....migration process started at 2012-10-04 05:00:28
.....estimated # of rows 169,830... (2 Replies)
HI
My doubt may be basic one but I need to get it clarified..
When i use "if" condition that checks for many AND, OR logical conditions
like
if ]; then
return 0
fi
Even the if condition fails it returns as zero.. Any clue..
But if i add else condition like
if ]; ... (2 Replies)
Hi
I am trying to run CMD that combining EGREP and PERL in multiple files
cat *07:00.22-12-13.txt | egrep" NAME| perl -ne 'print if /^sid9/ .. /^!/' "
I need the see the NAME and the text from sid9 to !
how can I use the EGERP in parallel to the PERL ?
This is one file
Qqq... (2 Replies)
Discussion started by: sharong
2 Replies
LEARN ABOUT DEBIAN
torrus_snmpfailures
TORRUS_SNMPFAILURES(8) torrus TORRUS_SNMPFAILURES(8)NAME
snmpfailures - Displays SNMP collector failures.
SYNOPSIS
torrus snmpfailures --tree=TREENAME [options...]
OPTIONS --details
In addition to failure counters, list the failed SNMP hosts and the time stamps of failure events.
--help
Displays a help message.
DESCRIPTION
This utility prints the SNMP collector failure information in JSON format. Without --details option, it prints only the failure counters.
Upon collector startup or after the tree re-compilation, the failure counters are reset to zero.
The output is very convenient for further automatic processing in any scripting language.
The top level of the output is a JSON object with the following name/value pairs:
total_unreachable: NUMBER
Displays the number SNMP hosts that are currently unreachable. The number adds up across multiple collector instances for a given
tree. If a host becomes reachable again, the number is decreased.
total_deleted: NUMBER
Displays the number SNMP hosts that are completely removed from SNMP collection for the life cycle of the collector process. This
happens when a host is unreachable for too long time and the collector gives up to reach it again. The number adds up across multiple
collector instances for a given tree.
total_mib_errors: NUMBER
Displays the number of MIB errors (noSuchObject, noSuchInstance, and endOfMibView) during the collector life cycle. The number adds up
across multiple collector instances for a given tree.
detail_unreachable: OBJECT, detail_deleted: OBJECT
If the option --details is specified, these objects contain the host names and timestamps of the failures. The keys are
contactenations of SNMP host, UDP port, and SNMP community separated by "|". The values are objects representing the UNIX timestamp
and a human-readable time string.
detail_mib_errors: OBJECT
If the option --details is specified, this object displays the MIB error details: for each SNMP host, it lists the datasource leaves
which had these errors and the event timestamps.
EXAMPLES
The following example illustrates an SNMP host unreachable:
torrus failures --tree=main --details
{
"detail_deleted" : {},
"detail_mib_errors" : {},
"detail_unreachable" : {
"217.101.101.101|161|public" : {
"time" : "Fri Jul 23 14:15:10 2010",
"timestamp" : 1279887310
}
},
"total_deleted" : 0,
"total_mib_errors" : 0,
"total_unreachable" : 1
}
The following example illustrates a MIB error:
torrus failures --tree=main --details
{
"detail_deleted" : {},
"detail_mib_errors" : {
"217.101.102.102|161|public" : {
"count" : 1,
"nodes" : {
"/Routers/CMTS3/Temperature_Sensors/sensor_01" : {
"time" : "Fri Jul 23 15:26:14 2010",
"timestamp" : 1279891574
}
}
}
},
"detail_unreachable" : {},
"total_deleted" : 0,
"total_mib_errors" : 1,
"total_unreachable" : 0
}
SEE ALSO torrus(8),
NOTES
See more documentation at Torrus home page: http://torrus.org
AUTHOR
Stanislav Sinyagin <ssinyagin@yahoo.com>
torrus 2.03 2013-07-26 TORRUS_SNMPFAILURES(8)