Hello,
I am newbie to bash scripting. Could someone help me with the following.
I have log file with output as shown below
**************************LOG*************************
Code:
11/20/2013 9:11:23.64 Pinging xx.xx.xx.xx with 32 bytes of data:
11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx: bytes=32 time=62ms TTL=125
11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx: bytes=32 time=41ms TTL=125
11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx: bytes=32 time=57ms TTL=125
11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx: bytes=32 time=78ms TTL=125
11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx: bytes=32 time=60ms TTL=125
11/20/2013 9:11:23.64 Reply from xx.xx.xx.xx: bytes=32 time=56ms TTL=125
11/20/2013 9:11:23.64 Ping statistics for xx.xx.xx.xx:
11/20/2013 9:11:23.64 Packets: Sent = 6, Received = 6, Lost = 0 (0% loss),
11/20/2013 9:11:23.64 Approximate round trip times in milli-seconds:
11/20/2013 9:11:23.64 Minimum = 41ms, Maximum = 78ms, Average = 60ms
**************************LOG*************************
I' m trying to grep for lines of an output with time >=60ms.
hi all,
from a shell (ksh) script, i am doing a 'grep'. how do i find out the number of lines returned from that 'grep' command ??
thanks in advance. (4 Replies)
I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
I have a file with contents similar to this.
abcd
1234
4567
7666
jdjdjd
89289
9382
92
jksdj
9823
298
I want to write a shell script which count the number of lines that start with the number (disregard the lines starting with alphabets) (1 Reply)
Hello,
In my code I am checking to see if a variable that contains a decimal number is greater than 0 in the following manner:
if
do something
fi
However I am getting the error message (if $i for the current iteration holds 9.6352)
command 9.6352 is not found
How can I rectify... (5 Replies)
data:
hello mr smith 400 you all ok?
hello mrs. smith 700 you all ok?
hello mr. everyone 150 you all ok?
hello mr. you all 199 im lad you are ok
using egrep, how can i grep out only lines that have a number greater than 250?
cat data | egrep .....
can't use awk here. i was... (7 Replies)
Hi Guru's,
I am trying to grep a range of line numbers (based on match) and then look for another match which starts with a special character '$' and print the line number. I have the below code but it is actually printing the line number counting starting from the first line of the range i am... (15 Replies)
Hi, This is my first post.
I have a korn shell script which outputs a select statment to a file. There is only one column and one row which contains a record count of the select statement.
The select statement looks something like this:
SELECT COUNT(some_field) AS "count_value"
... (2 Replies)
please let me know how to construct if then else by comparing two numbers if it is greater than 10000. I need to do some specific task executed.
can you help me out in shell scripting plz. (6 Replies)
Hi ,
My record file , need to print up to above (DATA array)(there may be n no lines ) , grep "myvalue" row now .....suggest me some options
--- DATA Array---
record type xxxxx
sequence type yyyyy
2
3---> data1
/dev/
--- DEVICE ---
MAXIMUM_People=
data_blocks=
MY_value=2
xyz
abc ... (0 Replies)
I want to check my data quality. I want to output the lines with non-number. I used the grep command:
grep '' myfile.csv
Since my file is csv file, I don't want to output the lines with comma. And I also don't want to output "." or space. But I still get the lines like the following:... (8 Replies)
Discussion started by: twotwo
8 Replies
LEARN ABOUT CENTOS
dnssec-coverage
DNSSEC-COVERAGE(8) BIND9 DNSSEC-COVERAGE(8)NAME
dnssec-coverage - checks future DNSKEY coverage for a zone
SYNOPSIS
dnssec-coverage [-K directory] [-f file] [-d DNSKEY TTL] [-m max TTL] [-r interval] [-c compilezone path] [zone]
DESCRIPTION
dnssec-coverage verifies that the DNSSEC keys for a given zone or a set of zones have timing metadata set properly to ensure no future
lapses in DNSSEC coverage.
If zone is specified, then keys found in the key repository matching that zone are scanned, and an ordered list is generated of the events
scheduled for that key (i.e., publication, activation, inactivation, deletion). The list of events is walked in order of occurrence.
Warnings are generated if any event is scheduled which could cause the zone to enter a state in which validation failures might occur: for
example, if the number of published or active keys for a given algorithm drops to zero, or if a key is deleted from the zone too soon after
a new key is rolled, and cached data signed by the prior key has not had time to expire from resolver caches.
If zone is not specified, then all keys in the key repository will be scanned, and all zones for which there are keys will be analyzed.
(Note: This method of reporting is only accurate if all the zones that have keys in a given repository share the same TTL parameters.)
OPTIONS -f file
If a file is specified, then the zone is read from that file; the largest TTL and the DNSKEY TTL are determined directly from the zone
data, and the -m and -d options do not need to be specified on the command line.
-K directory
Sets the directory in which keys can be found. Defaults to the current working directory.
-m maximum TTL
Sets the value to be used as the maximum TTL for the zone or zones being analyzed when determining whether there is a possibility of
validation failure. When a zone-signing key is deactivated, there must be enough time for the record in the zone with the longest TTL
to have expired from resolver caches before that key can be purged from the DNSKEY RRset. If that condition does not apply, a warning
will be generated.
The length of the TTL can be set in seconds, or in larger units of time by adding a suffix: 'mi' for minutes, 'h' for hours, 'd' for
days, 'w' for weeks, 'mo' for months, 'y' for years.
This option is mandatory unless the -f has been used to specify a zone file. (If -f has been specified, this option may still be used;
it will overrde the value found in the file.)
-d DNSKEY TTL
Sets the value to be used as the DNSKEY TTL for the zone or zones being analyzed when determining whether there is a possibility of
validation failure. When a key is rolled (that is, replaced with a new key), there must be enough time for the old DNSKEY RRset to have
expired from resolver caches before the new key is activated and begins generating signatures. If that condition does not apply, a
warning will be generated.
The length of the TTL can be set in seconds, or in larger units of time by adding a suffix: 'mi' for minutes, 'h' for hours, 'd' for
days, 'w' for weeks, 'mo' for months, 'y' for years.
This option is mandatory unless the -f has been used to specify a zone file, or a default key TTL was set with the -L to dnssec-keygen.
(If either of those is true, this option may still be used; it will overrde the value found in the zone or key file.)
-r resign interval
Sets the value to be used as the resign interval for the zone or zones being analyzed when determining whether there is a possibility
of validation failure. This value defaults to 22.5 days, which is also the default in named. However, if it has been changed by the
sig-validity-interval option in named.conf, then it should also be changed here.
The length of the interval can be set in seconds, or in larger units of time by adding a suffix: 'mi' for minutes, 'h' for hours, 'd'
for days, 'w' for weeks, 'mo' for months, 'y' for years.
-c compilezone path
Specifies a path to a named-compilezone binary. Used for testing.
SEE ALSO dnssec-checkds(8), dnssec-dsfromkey(8), dnssec-keygen(8), dnssec-signzone(8)AUTHOR
Internet Systems Consortium
COPYRIGHT
Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC")
BIND9 April 16, 2012 DNSSEC-COVERAGE(8)