get drive serial numbers from NetApp DS4243 shelves strapped to Linux server

When doing data recovery on a failed 3Ware RAID group, I utilized a couple spare NetApp DS4243 shelves. I put all the SATA drives into brackets, popped a quad port SAS card into a 1U server, and booted my rescue image from the network. The Debian OS was able to see each individual drive, at which point I could make ddrescue copies, and edit the 3Ware DCB metadata using hexedit. Keeping everything straight was quite a challenge. This one liner helped me find all the serials, and get the copies sorted out:

# for i in `ls /dev | grep sd | sed -e 's/[0-9]//' | sort -u`; do echo -n "/dev/$i " ; smartctl --all /dev/$i | grep "Serial number" | awk '{print " --- " $3}'; done;
/dev/sdaa  --- 9VS0R3T4
/dev/sdab  --- 9VS3SSJE
/dev/sdac  --- 9VS2K1DY
/dev/sdad  --- 9VS07FMW
/dev/sdae  --- 9VS402AA
/dev/sdaf  --- 9VS3V74N
/dev/sdag  --- 9VS388JX
/dev/sdah  --- 9VS2AQ9A
/dev/sdai  --- 9VS3THY9
/dev/sdaj  --- 9VS4EE3T
/dev/sdak  --- 9VS0FXWA
/dev/sdal  --- 9VS34DAD
/dev/sdam  --- 9VS45C9J
/dev/sdan  --- 9VS4L45S
/dev/sdao  --- 9VS2K9K1
/dev/sdap  --- 9VS2D631
/dev/sdaq  --- 9VS2L1BK
/dev/sdar  --- 9VS4DYDB
/dev/sdas  --- 9VS3T33R
/dev/sdat  --- 9VS3YE1K
/dev/sdc  --- 9VS1HWAM
/dev/sdd  --- 9VS1J9F3
/dev/sde  --- 9VS1L0FY
/dev/sdf  --- 9VS1H3RB
/dev/sdg  --- 9VS1JNPW
/dev/sdh  --- 9VS1GWGK
/dev/sdi  --- 9VS1DLZZ
/dev/sdj  --- 9VS1FSRD
/dev/sdk  --- 9VS3A8GZ
/dev/sdl  --- 9VS1L8ZZ
/dev/sdm  --- 9VS1JE7E
/dev/sdn  --- 9VS1CHE1
/dev/sdo  --- 9VS295R5
/dev/sdp  --- 9VS1HR8P
/dev/sdq  --- 9VS1EJQW
/dev/sdr  --- 9VS1A4V5
/dev/sds  --- 9VS1JGP8
/dev/sdt  --- 9VS1HPGB
/dev/sdu  --- 9VS1JAWZ
/dev/sdv  --- 9VS1JG8K
/dev/sdw  --- 9VS1JA51
/dev/sdx  --- WD-WMATV4441330
/dev/sdy  --- 9VS38GT3
/dev/sdz  --- 9VS4SQJX
#