10-18-2010
Shell script to give broadcast and network address
Hello,
I am running a post script in autoyast where I am trying to set the broadcast and network address.
I have the ip address and netmask already (reading from a file)..
I saw the post from fpmurphy but it is using ksh which isn't an option in autoyast.
Thanks in advance!
10 More Discussions You Might Find Interesting
1. IP Networking
What is the significance of the broadcast address? (1 Reply)
Discussion started by: 98_1LE
1 Replies
2. Shell Programming and Scripting
Dear all,
This is the Bionic Fysh again. I have two quick questions:
1- when writing shell scripts, how does one allow the tilda ~ into the script ?
e.g
ls ~;
ls ~me;
user=you;
ls ~$user (N.B I think that for this one you need: ls `~$user`)
2- In FreeBSD 4.0, I would like for a... (6 Replies)
Discussion started by: bionicfysh
6 Replies
3. UNIX for Dummies Questions & Answers
say I have a IP address which is 10.0.0.12, and subnet mask is 255.255.255.240, what is the network address and what is the broadcast address which host lives on?
And could you explain how to get the answer?
thanx in advance! (7 Replies)
Discussion started by: pnxi
7 Replies
4. Solaris
I have a bge1 card and a bge0 card, i want the broadcast addresses to match, ifconfig shows this
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
... (1 Reply)
Discussion started by: csaunders
1 Replies
5. Shell Programming and Scripting
hi all...
I am executing a comman in a shell script but the command needs a user input of character 'y' as input so it stops in between...may i know is there is any way of giving that character as input in the shell script itself???...thanks in advance.... (6 Replies)
Discussion started by: santy
6 Replies
6. Shell Programming and Scripting
Hi,
I want to send input to promt from shell script, this thing is possible.
I give the one command
`/usr/share/ssl/misc/CA -newreq`
it needs some user input like password etc., but i need this input also from shell script but it does not works.
`/usr/share/ssl/misc/CA -newreq` <<EOF... (2 Replies)
Discussion started by: Vaibhav Agarwal
2 Replies
7. Shell Programming and Scripting
Hi
Suppose
You have two computers. One named kenny which has an IP address of 192.168.0.7. kenny lives
on a subnet with a subnet mask of 255.255.255.240. The second computer is called zathras, which
has an IP address of 192.168.0.17, zathras lives on a network with the same subnet mask.
i)... (4 Replies)
Discussion started by: scofiled83
4 Replies
8. Solaris
hi,
I am trying to configure one of my interfaces, but after reboot - i lose the changes to the netmask & broadcast address.
I have added an entry in /etc/netmasks, but it doesnt pick up the new settings. any ideas - much appreciated.
before reboot:
eri0:... (3 Replies)
Discussion started by: badoshi
3 Replies
9. Programming
My problem definition is ,I have to send a message from one node in a network and it has to be broadcasted to all other nodes in the network.The program what I have given below will be running in all the nodes in the network.The same program should be capable of sending(broadcasting) and receiving.... (1 Reply)
Discussion started by: vigneshinbox
1 Replies
10. Shell Programming and Scripting
Hi folks
I need to write UNIX script (with ldapsearch) to query Active Directory. Input is NT login name and output is Email address.
Attached a screenshot of Sysinternals "AD Explorer". I need to do the same in CLI.
http://i.imgur.com/4s6FB.png
I am absolute LDAP/ldapsearch noob. (0 Replies)
Discussion started by: slashdotweenie
0 Replies
LEARN ABOUT REDHAT
ipcalc
IPCALC(1) RH IPCALC(1)
NAME
ipcalc - perform simple manipulation of IP addresses
SYNOPSIS
ipcalc [OPTION]... <IP address>[/prefix] [netmask]
DESCRIPTION
ipcalc provides a simple way to calculate IP information for a host. The various options specify what information ipcalc should display on
standard out. Multiple options may be specified. An IP address to operate on must always be specified. Most operations also require a
netmask or a CIDR prefix as well.
OPTIONS
-b, --broadcast
Display the broadcast address for the given IP address and netmask.
-h, --hostname
Display the hostname for the given IP address.
-m, --netmask
Calculate the netmask for the given IP address. It assumes that the IP address is in a complete class A, B, or C network. Many net-
works do not use the default netmasks, in which case an inappropriate value will be returned.
-p, --prefix
Show the prefix for the given mask/IP address.
-n, --network
Display the network address for the given IP address and netmask.
-s, --silent
Don't ever display error messages.
AUTHORS
Erik Troan <ewt@redhat.com>
Preston Brown <pbrown@redhat.com>
REPORTING BUGS
Report bugs to our bugtracking system: http://bugzilla.redhat.com/bugzilla.
COPYRIGHT
Copyright (C) 1997-2001 Red Hat, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
ipcalc(3)
Red Hat, Inc. April 30 2001 IPCALC(1)