nv-l

Re: [nv-l] loadhosts CLI

2004-02-11 12:56:55
Subject: Re: [nv-l] loadhosts CLI
From: Paul <pstroud AT bellsouth DOT net>
To: nv-l AT lists.us.ibm DOT com
Date: Wed, 11 Feb 2004 12:50:38 -0500
Chris,
Create a file like this:
ip hostname
etc

then use something like this

while read line
do
loadhosts -m xxx.xxx.xxx.xxx $line
done < file_you_created

Paul



Christopher J Petrina wrote:


hello all,

attempting to use loadhosts inside a script on UNIX. generally when I want to do a loadhosts it looks something like this.

loadhosts -m subnet <<EOF
>ip hostname
>ip hostname
>ip hostname
>EOF

this works at the command line jsut fine. My issue however is how can I put all that onto one line so that I can put it inside a script? if you look atl the line it has line feed (^J) characters in it but adding them in the script does not seem to work. any suggestions?
Thanks
Chris Petrina



<Prev in Thread] Current Thread [Next in Thread>