In aix, how do I find the parent device and delete the Parent and Child devices of the device? ==================== ========================================================== ===================================1. query the parent device of a device # lsdev-Cl hdisk1hdisk1 Available 01 -08-00 SAS Disk Drive # lsdev-C-l hdisk1-F parentsas0 # lsdev-C-l sas0-F parentsissas0 # lsdev-C-l sissas0-F parentpci0 # lsdev- c-l pci0-F parent sysplanar0 # lsdev-C-l sysplanar0-F parentsys0 # lsdev-C-l sys0-F parent ---- # Lsdev-p pci0sissas0 Available 01-08 PCI-X266 Planar 3 Gb sas raid Adapter # lsdev-p sissas0sas0 Available 01-08-00 Controller SAS Protocolsata0 Available 01- 08-00 Controller SATA Protocol # lsdev-p sas0 hdisk0 Available 01-08-00 SAS Disk Drivehdisk1 Available 01-08-00 SAS Disk Driveses0 Available 01-08-00 SAS Enclosure Services Dev Iceses1 Available 01-08-00 SAS Enclosure Services Deviceses2 Available 01-08-00 SAS Enclosure Services Device --------------------------------------------------------script: for I in 'lsdev-C | awk' {print $1 }''; do DEV = $ I PARENT = 'lsdev-F parent-Cl $ DEV 'STRING = $ PARENT "" $ DEV while [aaa $ PARENT! = Aaa]; do DEV = $ PARENT = 'lsdev-F parent-Cl $ DEV 'STRING = $ PARENT "" $ STRING done echo $ STRING done | sort