Hi,
On Jul 4, 2013 12:23 AM, "Paul Gear" <observium@gear.dyndns.org> wrote:
>
> Chris, your script is functionally identical to David's. Changing variables to upper case and leaving out the quotes will make no difference.Quotes do make a difference when there is a space in the file. Because of the quotes it will become part of the hostname.
> David, can you ping the given host by name? That message means that the name lookup (whether using the local hosts file or DNS) failed.
>
>
> On 07/04/2013 07:42 AM, Chris Moody wrote:
>>
>> Your bash loop syntax is likely the culprit.
>>
>> If you have your devices/nodes listed in a text file, I'd iterate like so:
>>
>> for NODE in `cat textfile.txt`; do ./addhost.php $NODE community v2c; done
>>
>> -Chris
>>
>> On 7/3/13 3:45 PM, David Lagace wrote:
>>>
>>> I tried to script it in the following way (please don't hurt me I'm not much
>>> of a coder)
>>>
>>> for file in `cat routerdt1`; do ./addhost.php "$file" mycomm v2c; done
>>>
>>>
>>> But keep getting: Could not resolve i504562
>