02-07-2014
Thanks to all
Special thanks to chubler. The code worked perfectly. I am trying it out on other hosts now and will also do some extensive testing before I make it more dynamic.
I am planning to make it more dynamic and use this script to do repeated things like clearing cache, files et al on remote hosts.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have program that I want to be able to use I guess you would call them functions.... to run muliple little programs or loops with one menu script. How would I do this. Here is some code I am using. Sorry about the formatting....it doesn't paste well.
echo "*****************************... (3 Replies)
Discussion started by: darthur
3 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to write a bash script that will read a list of numbers from a file, then it needs to use netcat to create a socket connection and pass header/request. I need to limit it to 100 connections. So, after the first set of 100 are fineshed, I need to loop and do it again with... (0 Replies)
Discussion started by: willdev
0 Replies
3. Shell Programming and Scripting
Hey guys,
I'm kinda a noob at scripting. I am trying to create a script that uses multiple for loops with the lsiutility to monitor disk health on a system.
The script runs, but it will continually echo an infinite number of LogVolumes when there are only 2 per virtual disk on my server. It's... (2 Replies)
Discussion started by: tank126
2 Replies
4. Shell Programming and Scripting
Hi script gurus.
I have need to know how to use for loop with multiple variable.
Basically lets take for example /etc/passwd file has following entries
The above cat command will basically first greps the real users that have email addresses then converts ':' to '+' then using cut... (4 Replies)
Discussion started by: sparcguy
4 Replies
5. Shell Programming and Scripting
Hi,
I am trying to incorporate multiple while loops into an expect script written in ksh shell. This is on a Solaris 10 system. Here is the code:
#!/bin/ksh
EXPECT=/usr/local/bin/expect
exp_internal
i=1
h=0
while ]; do
$EXPECT << DONE
set stty_init raw
... (1 Reply)
Discussion started by: cic
1 Replies
6. Shell Programming and Scripting
Hi Guys-
I'm trying to write a script which takes date as input (mm.yy.dd) and search in the current file. If pattern doesn't exist it will then look in a backup directory and so on.
being a newb i'm unable to loop over to the backup directory. hoping for some ideas, i've highlighted the... (1 Reply)
Discussion started by: Irishboy24
1 Replies
7. UNIX for Dummies Questions & Answers
Guru,
I try to make a loop of 2 files,
Input
File1.txt:
1
2
File2.txt:
A
B
C
A, B and C is a file name, inside A
X
Y
Z
Expected Output
A.1
X (2 Replies)
Discussion started by: guns
2 Replies
8. Shell Programming and Scripting
I am trying to read a file line by line and then search that line in another file and get a particular column from the second file.
I have written this code.but its not working properly
#!/bin/sh
while read keyword in duplicate.txt
do
echo $keyword
while read line
do
... (7 Replies)
Discussion started by: Prachi Gupta
7 Replies
9. UNIX for Dummies Questions & Answers
Why wont my for statements work? Im trying to get this script to swich to a user an if you put in a start/stop/or restart paramater to do just that for each user. I commented out the actual start/stop actions to test it just by using echos and not do anything hasty in the environment but it... (0 Replies)
Discussion started by: LilyClaro
0 Replies
10. Shell Programming and Scripting
Hello,
I am trying to login to multiple servers and i have to run multiple loops to gather some details..Could you please help me out.
I am specifically facing issues while running for loops.
I have to run multiple for loops in else condition. but the below code is giving errors in for... (2 Replies)
Discussion started by: mohit_vardhani
2 Replies
nets(4) Kernel Interfaces Manual nets(4)
NAME
nets - JOIN DHCP server database
DESCRIPTION
The nets file is employed by joind, the JOIN DHCP server, to tell it which networks to administer and the ranges of IP addresses available
for dynamic assignment on each of those networks.
FORMAT
Blank lines and lines beginning with the number sign (#) are ignored. Entries are separated from one another by newline characters.
Entries consist of three fields: the network number (expressed as an IP address), the IP address or name of a host running joind, which
dynamically configures clients on the network, and a range of available addresses for dynamic allocation to hosts on the net. The range is
expressed as a pair of IP addresses separated with a dash (-). There must be no whitespace separating the dash from the IP addresses.
Several servers may administer a single network, and a single server may administer several networks. Each network-server pair may have
several ranges of IP addresses available for dynamic allocation. The network and server IP addresses do not have to be repeated for each
entry. A line containing a single field is assumed to be an IP range with the same server and network as the previous entry: a line of two
fields is assumed to be a server address and IP range with the same network as the preceding entry.
The ranges of addresses served by each cooperating server must be disjoint. This condition is checked by the server on startup.
RELATED INFORMATION
joind(8), join.ipaddresses(4) delim off
nets(4)