Here's the situation:
I'm trying to get the IP Addresses from the system names via a quick commandline script "cat file | while read line; do ping -c3 $line; done"
I get ping: unknown host <system name in the file>
However, when I do 'ping -c3 <system name in the file>' from the commandline I see the results of the ping as expected.
So, it seems that the name resolution works when individually done on the commandline, but when done within the script it doesn't resolve the name.
I've run it as 'root' and as a normal user.
Any thoughts?
Thanks,
cmarchman
I'm trying to get the IP Addresses from the system names via a quick commandline script "cat file | while read line; do ping -c3 $line; done"
I get ping: unknown host <system name in the file>
However, when I do 'ping -c3 <system name in the file>' from the commandline I see the results of the ping as expected.
So, it seems that the name resolution works when individually done on the commandline, but when done within the script it doesn't resolve the name.
I've run it as 'root' and as a normal user.
Any thoughts?
Thanks,
cmarchman