Hi im trying to do a bash script that are using bash
Code:
#!/bin/bash
#set -vx
speed=512K
while true
do
clear
echo "============================="
echo " Burning menu using dd "
echo "============================="
echo "Enter 1 for full path to iso."
echo "Enter 2 for media"
echo "Enter 3 to set bs speed 512K default"
echo "Enter 4 to execite dd command "
echo "Enter q to exit q:"
echo -e "\n"
echo -e "Enter your choice \c"
read -r choice
case "$choice" in
q) exit ;;
1) echo -e "Enter path to iso \c"
read -r iso ;;
2) echo -e "Enter device"
read -r device ;;
3) echo -e "Enter bs speed \c"
read -r speed ;;
4) echo "Going to format $device, are you sure (y/N)?"
read ans
if [[ "&ans" != "y" && "&ans" != "Y" ]]; then
echo "Clearing screen"
sleep 3
clear
"dd if=$iso of=/dev/$device bs=$speed"
echo "Burning please wait"
sleep 30
fi
esac
done
but when i execture "4" to use dd command i get this output
Quote:
./burn2.sh: line 33: dd if=~/Downloads/OS/Linux/Dists/m.img of=/dev/sdb1 bs=512K: No such file or directory
|
There is such file and i have tried with other iso:s and img:s
can anyone help a beginner?
mvh
Thanks in advance.