I had a more complicated script written a long time ago to find out this information,
but after realizing due to VBE's post (thank you VBE) that I could get all the info I
required in one place, I've reworked that into this simple script. Perhaps this will help?
# hp-ux 11.11
# Script will return the IP Address, Model Script and
# the MIO# for all printers configured on the system.
# script uses 'eval' to set the variables PERIPH (ip address), MODELSCRIPTNAME
#and PRINTERCFG (mio#) that exist in each printer interface. If one or more of the
#variables are not found, that information will be left blank, but the printer name
#will be printed.
# Create Header
printf '%-10s%-20s%-20s%-10s\n' "$Hptr" "$HIPA" "$HMOD" "$HMIO"
for ptr in *
if [[ -f $ptr ]]
# set PERIPH, MODELSCRIPTNAME & PRINTERCFG found in printer interface
eval $(grep -E "^PERIPH=|MODELSCRIPTNAME=|PRINTERCFG=" $ptr | xargs | tr ' ' ';')
printf '%-10s%-20s%-20s%-10s\n' "$ptr" "$PERIPH" "$MODELSCRIPTNAME" "$PRINTERCFG"
unset -v PERIPH MODELSCRIPTNAME PRINTERCFG