01-29-2016
Network summarization is the act of taking two or more IP networks and using a single IP network to represent them all
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
Can you please suggest a few lines of if statement to check if a variable is an ip address purely in bash/sh?
Thanks,
Marc (3 Replies)
Discussion started by: marcpascual
3 Replies
2. Shell Programming and Scripting
Hi Guys,
I have a file in UNIX with duplicates, I have use sort command as below to delete duplicates based on the KEY positions/columns but now I do not want to "delete" duplicates but summarize by KEY numeric columns.
REALLY NEED HELP... URGENT!!!
Thanks in advance.
sort -k 1.1,1.92... (6 Replies)
Discussion started by: shotronix
6 Replies
3. UNIX for Dummies Questions & Answers
Right now if I have a file that has the following information (with : as the delimiter)
name :address :phone number
I need to be able to do the following commands:
-n search for a name
-p search for a phone number
-l search for a last name starting with a particular
-c find an... (17 Replies)
Discussion started by: Generic
17 Replies
4. Shell Programming and Scripting
Hi,
I am having two variables
IP="10.150.12.1"
netmask="255.255.255.0"
To get network number, I know that a bitwise & will help.
networkno=IP & netmask
My code is
#!/usr/bin/ksh
ip="10.150.12.1"
netmask="255.255.255.0"
networkno="$ip" & "$netmask"
echo $networkno
I am... (7 Replies)
Discussion started by: chaitanyapn
7 Replies
5. Shell Programming and Scripting
Hi Friends,
Need your help . I have a shell script which executes the plsql procedure proc_p1.
I want to capture the error message when the procuder throws some error message.
I codeed in the following way . But it shows Job Success. Kindly anyone give some better idea to over come this
... (2 Replies)
Discussion started by: imipsita.rath
2 Replies
6. UNIX for Dummies Questions & Answers
Hello
I would like to help me create a script that:
Given a date, more precisely a year, one month and one day. must calculate the day after
-Input: Year, Month, Day
-Output: Next day the Year-Month-Day
thanks (9 Replies)
Discussion started by: karkov
9 Replies
7. Shell Programming and Scripting
I wrote the day calculator also in bash. I would like to now, that is it good so?
#!/bin/bash
datum1=`date -d "1991/1/1" "+%s"`
datum2=`date "+%s"`
diff=$(($datum2-$datum1))
days=$(($diff/(60*60*24)))
echo $days
Thanks in advance for your help! (3 Replies)
Discussion started by: kovacsakos
3 Replies
8. UNIX for Dummies Questions & Answers
I have two problems, and it would be great if someone could help me:
The first line does not calculate. I have checked the origin term to calculate the variables
and the result is OK. Normal substactions with $xx -100 work, but not in this constallation. I tried it with "| bc" and no result... (2 Replies)
Discussion started by: Pieter0815
2 Replies
9. Shell Programming and Scripting
I am new to bash scripting. I want write a script that reads from the first argument file and run nslookup, then prints out each nslookup. Something like below:
File name = ip
8.8.8.8
8.8.4.4
Bash shell script: nslookup.sh
#!/bin/bash
for i in $1
do
nslookup $i
done
I... (7 Replies)
Discussion started by: boldnbeautiful
7 Replies
10. Shell Programming and Scripting
I am trying to use awk to calculate the average of all lines in $2 for every file in a directory. The below bash seems to do that, but I cannot figure out how to capture the string before the _ as the output file name and have it be tab-delimeted. Thank you :).
Filenames in... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT SUNOS
networks
networks(4) File Formats networks(4)
NAME
networks - network name database
SYNOPSIS
/etc/inet/networks
/etc/networks
DESCRIPTION
The networks file is a local source of information regarding the networks which comprise the Internet. The networks file can be used in
conjunction with, or instead of, other networks sources, including the NIS maps networks.byname and networks.byaddr and the NIS+ table
networks. Programs use the getnetbyname(3SOCKET) routines to access this information.
The network file has a single line for each network, with the following information:
official-network-name network-number aliases
Items are separated by any number of SPACE or TAB characters. A `#' indicates the beginning of a comment. Characters up to the end of the
line are not interpreted by routines which search the file. This file is normally created from the official network database maintained at
the Network Information Control Center (NIC), though local changes may be required to bring it up to date regarding unofficial aliases
and/or unknown networks.
Network numbers may be specified in the conventional dot (`.') notation using the inet_network routine from the Internet address manipula-
tion library, inet(7P). Network names may contain any printable character other than a field delimiter, NEWLINE, or comment character.
SEE ALSO
getnetbyaddr(3SOCKET), getnetbyname(3SOCKET), inet(3SOCKET), nsswitch.conf(4), inet(7P)
NOTES
The official SVR4 name of the networks file is /etc/inet/networks. The symbolic link /etc/networks exists for BSD compatibility.
The network number in networks database is the host address shifted to the right by the number of 0 bits in the address mask. For example,
for the address 24.132.47.86 that has a mask of fffffe00, its network number is 803351. This is obtained when the address is shifted right
by 9 bits. The address maps to 12.66.23. The trailing 0 bits should not be specified. The network number here is different from that
described in netmasks(4). For this example, the entry in netmasks would be 24.132.46.0 fffffe00.
SunOS 5.10 17 Jan 2002 networks(4)