I would like to know if somebody already did a script to make a "Tree view" of the devices with Parents and Childs with the basic commands lsdev and odmget ?
# Name Specifies the device logical
echo " "
echo "### Devices in the system and their characteristics ###"
lsdev -l $1
# LIST CHILDS FROM THE SELECTED DEVICE
echo " "
echo "### LIST CHILDS FROM THE DEVICE $1 ###"
lsdev -l $1 | awk '{ print "lsdev | grep " $3}' | sh | sort -n
# LIST PARENTS FROM THE SELECTED DEVICE
echo " "
echo "### PARENT DEVICE FOR $1 ###"
lsdev -l $1 -F parent
# LIST PARENTS FROM THE SUB-DEVICE SELECTED
echo " "
a=$(lsdev -l $1 -F parent)
echo "### PARENT DEVICE FOR $a ###"
lsdev -l $(lsdev -l $1 -F parent) -F parent
# LIST ALL THE CHILD DEVICES CONNECTED TO THE DEVICE
echo " "
echo "### ALL THE CHILD DEVICES CONNECTED TO DEVICE $a ###"
lsdev -p $(lsdev -l $1 -F parent)
# LIST ALL THE CHILD DEVICES CONNECTED TO THE DEVICE
echo " "
b=$(lsdev -l $(lsdev -l $1 -F parent) -F parent)
echo "### ALL THE CHILD DEVICES CONNECTED TO DEVICE $b ###"
lsdev -p $(lsdev -l $(lsdev -l $1 -F parent) -F parent)
"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.