Skip to content

Instantly share code, notes, and snippets.

@xarses
Created March 30, 2015 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xarses/de6603e8b0009a250d73 to your computer and use it in GitHub Desktop.
Save xarses/de6603e8b0009a250d73 to your computer and use it in GitHub Desktop.
print-partations
for dev in $devs ;
do
echo "device: ${dev}"
parts=$(ls /dev/${dev}?*)
for part in $parts ;
do
partnum=$(echo ${part} | awk -F"/dev/${dev}" '{print $2}')
echo "Part: ${part}"
sgdisk -i ${partnum} /dev/${dev} | grep "Partition GUID code"
echo ""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment