Service IT Direct and COVID-19 UPDATE for more information CLICK HERE

Call NOW:
888-596-4720

Service IT Direct and COVID-19 UPDATE for more information CLICK HERE

Call NOW:
888-596-4720

nsquery returns no IP address in a pipe

nsquery returns a null value for Address: when used in a pipe or assigned to a variable.

Environment: PARISC running HP-UX 11.31

Examples:
###### (no pipe = normal behavior) #######
# nsquery hosts atl1
Using “files [NOTFOUND=continue UNAVAIL=continue] dns” for the hosts policy.
Searching /etc/hosts for atl1
Hostname: atl1
Aliases: atl1.corp.ad
Address: 10.11.10.200
Switch configuration: Terminates Search

###### (pipe = missing IP address) #######
# nsquery hosts atl1 | grep Address:
Address:

# nsquery hosts atl1 | awk ‘/Address:’
Address:

This has been tested on 11.00, 11.11, 11.23 and 11.31, PARISC and IA64.
Only PARISC at 11.31 exhibits this behavior.

– See more at: https://serviceitdirect.com/blog/nsquery-returns-no-ip-address-pipe#sthash.2Bq00Q0C.dpuf

Tags: , ,

Categories: HP-UX