Hello Unix Community
I just have a cahllenge to grap out only one entry out of a /etc/hostname file
By now - on a single system - it works fine
We use
VAR='awk -v myvar=${HOST} 'match($2,myvar){print $1}' /etc/hosts'
nslookup $VAR
But if we have a RAC Cluster or different Lan sehgments we do have the hostname two ore more times which gives us a Variable with 2 or more IP Adresses which let nslookup fail.
thanks
Uwe
I just have a cahllenge to grap out only one entry out of a /etc/hostname file
By now - on a single system - it works fine
We use
VAR='awk -v myvar=${HOST} 'match($2,myvar){print $1}' /etc/hosts'
nslookup $VAR
But if we have a RAC Cluster or different Lan sehgments we do have the hostname two ore more times which gives us a Variable with 2 or more IP Adresses which let nslookup fail.
thanks
Uwe