07-02-2013
Hello kumar,
Could you please let me know if you have any pattern for IPs or you have any list for IPs that need to be cnaged with a list of IPs ?
Then we can do it in a better way from awk and sed please get back to me for same.
Thanks,
R. Singh
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
i have a text file something like that
FLAG DATE(YYYYMMDD) TIME(HHMMSS)
FLAG1 DATE20060101 141216
FLAG1 DATE20070101 141216
FLAG2 DATE20060102 140010
FLAG2 DATE20060103 101212
FLAG1 ... (6 Replies)
Discussion started by: gfhgfnhhn
6 Replies
2. Shell Programming and Scripting
Hi,
I have a conf.file with the following values:
ef=78
b=40
ca=40
c=45/dev2
when I modify one of the line with the below awk script,it's modifying BUT it's placing the modified line in the last line :
input:- Configure b 45/dev4
output:-
ef=78
ca=40
... (2 Replies)
Discussion started by: axes
2 Replies
3. Shell Programming and Scripting
Hi All,
how to get solaris box local ip addresss in variable, using sed or awk utlities.
Thanks,
Mani Muthu (7 Replies)
Discussion started by: k_manimuthu
7 Replies
4. Shell Programming and Scripting
I need help modifying the code below.
DATAFILE is a log file.
I have two strings i need to search for in the log file.
The two strings are:
1. ERROR
2. com.rolander.promotions.client
awk 'BEGIN {
while((getline < "'${SFILE}'")>0)
S
FS="\n"; RS="\n"
} (11 Replies)
Discussion started by: SkySmart
11 Replies
5. Shell Programming and Scripting
I want the below script to omit every chunk of data that contains a specific hostname.
here's the scenario. i have a configuration file that contains the configuration of several hosts. a sample of this configuration file is this:
define host {
address ... (12 Replies)
Discussion started by: SkySmart
12 Replies
6. Shell Programming and Scripting
Hi,
In a file, I have several time
<IP>232.0.1.164</IP>
...
<IP>232.0.1.135</IP>
I need to replace all the random IP addresses , by 239.0.0.1 and 239.0.0.2 , alternatively.
I try this
grep "<IP>" tsp.xml | awk '{if(NR % 2)print $0}' | cut -d"<" -f2 | cut -d">" -f2 ... (3 Replies)
Discussion started by: FredMo
3 Replies
7. Shell Programming and Scripting
so i have this data in a file:
jime=1860,yime=1.23243,lime=
jime=1859,yime=1.23018,lime=
jime=1825,yime=1.15371,lime=
jime=1849,yime=1.20769,lime=
jime=1841,yime=1.1897,lime=
jime=1849,yime=1.20769,lime=
i use this code to calculate the percentage difference of the number in column 2... (9 Replies)
Discussion started by: SkySmart
9 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I am using awk command to print some output, but there are some characters that I would like to remove from the output
awk '{print $5$6}'
the output I get is
column5/:column6
I am looking forward to remove the : and to get the output
column5/column6
Sorry if this question is... (4 Replies)
Discussion started by: Error404
4 Replies
9. Shell Programming and Scripting
can someone help me identify what i'm doing wrong here:
awk -F'|' 'BEGIN{c=0} /./ && /./ {
if ($3 < 2) { print ; c++ } END { print c":OK" }
else if (($3 >= 2) && ($3 < 4)) { print ; c++ } END { print c":WARNING" }
else if ($3 >= 4) { print ; c++ } END { print c":CRITICAL" }
}'... (4 Replies)
Discussion started by: SkySmart
4 Replies
10. Shell Programming and Scripting
i have a php file that has this:
php.code
#!/usr/bin/php
<?php
phpinfo();
hlight_file(__FILE__);
?>
I want my awk code grab whatever is inbetween and including the "<?php" and "?>".
Then, it should scan all the entries between these two points. And if the entries between these... (10 Replies)
Discussion started by: SkySmart
10 Replies
LEARN ABOUT DEBIAN
nutscan_cidr_to_ip
NUTSCAN_CIDR_TO_IP(3) NUT Manual NUTSCAN_CIDR_TO_IP(3)
NAME
nutscan_cidr_to_ip - Convert a CIDR IP to a range of IP address.
SYNOPSIS
#include <nut-scan.h>
int nutscan_cidr_to_ip(const char * cidr, char ** start_ip, char ** stop_ip);
DESCRIPTION
The nutscan_cidr_to_ip() function converts a range of IP address in the CIDR format given as a string in cidr, to two IPs in strings
pointed by start_ip and stop_ip which can be used as input paramters in the scanning functions of the libnutscan API. It is the caller's
responsability to free start_ip and stop_ip strings.
RETURN VALUE
The nutscan_cidr_to_ip() function returns 0 if an error occured (invalid cidr address) or 1 if successful.
SEE ALSO
nutscan_scan_usb(3), nutscan_scan_xml_http(3), nutscan_scan_nut(3), nutscan_scan_avahi(3), nutscan_scan_ipmi(3), nutscan_scan_snmp(3),
nutscan_display_parsable(3), nutscan_display_ups_conf(3)
Network UPS Tools 05/22/2012 NUTSCAN_CIDR_TO_IP(3)