diff --git a/format-buddy.sh b/format-buddy.sh index eae36b8..5baf552 100755 --- a/format-buddy.sh +++ b/format-buddy.sh @@ -19,8 +19,8 @@ while true; do echo -n "Type full path to device (/dev/xx1): " read device - if [[ ! "${device}" =~ ^/dev/[a-z]+[0-9]*$ ]]; then - echo "Error: Invalid device path" + if [ ! -b "${device}" ]; then + echo "Error: ${device} is not a block device" read -n 1 -p "Press any key..." continue fi