You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dd_prololive_auto.sh 420B

123456789101112131415161718192021222324252627
  1. #! /usr/bin/env sh
  2. devices=""
  3. check_devices()
  4. {
  5. devices_tmp=$(ls /dev | grep -E '^sd[a-z]$')
  6. if [ "${devices}" != "${devices_tmp}" ]
  7. then
  8. devices="${devices_tmp}"
  9. echo "${devices}"
  10. echo -n "Enter device to dump: "
  11. read device
  12. if [ "${device}" != "" ]
  13. then
  14. ./dd_prololive.sh "${device}"
  15. else
  16. echo "Doing nothing"
  17. fi
  18. fi
  19. }
  20. while :;
  21. do
  22. check_devices
  23. sleep 0.1
  24. done