Listar discos con fdisk y bash en Linux
#bash> fdisk -l 2>/dev/null | grep "Disk /" | grep -v "/dev/md" | awk '{print $2}' | sed -e 's/://g'
/dev/sdb
/dev/sda
/dev/sdd
/dev/sde
/dev/sdf
/dev/sdc
/dev/sdh
/dev/sdg
/dev/mapper/cl-root
/dev/mapper/cl-swap
/dev/mapper/cl-home
/dev/mapper/HD10T-4
/dev/mapper/HD10T-3
/dev/mapper/HD10T-2
/dev/mapper/HD10T-1
/dev/mapper/HD8T-1
/dev/mapper/HD8T-2
/dev/mapper/HD8T-3
/dev/loop0
/dev/loop1
/dev/mapper/docker-2530-0000000-pool
/dev/mapper/docker-2530-0000000-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1
/dev/mapper/docker-2530-0000000-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2
/dev/mapper/docker-2530-0000000-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3
/dev/mapper/docker-2530-0000000-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4