Skip to main content
Post Closed as "Duplicate" by JdeBP, CommunityBot, GAD3R, Sparhawk, icarus
added 116 characters in body
Source Link
Educ
  • 413
  • 1
  • 7
  • 11

I wrote this script

#!/bin/bash
 
if [ $# -ne 2 ] ;
 
 then
 
echo "\n      Usage : sh $0 BSSID interface   \n"
 
exit 0;
fi
while true;
 
 do
 
reaver -b $1 -i $2 -vv -N -g 10 -S -a
 
sleep 3603;
 
done

but i got this messages : enter image description here

bash T.sh
T.sh :line 2: $'\r':command not found
T.sh :line 10: $'\r':command not found
T.sh :line 27: syntax error near unexpected token 'done'
T.sh: line 27: 'done'

I wrote this script

#!/bin/bash
 
if [ $# -ne 2 ] ;
 
 then
 
echo "\n      Usage : sh $0 BSSID interface   \n"
 
exit 0;
fi
while true;
 
 do
 
reaver -b $1 -i $2 -vv -N -g 10 -S -a
 
sleep 3603;
 
done

but i got this messages : enter image description here

I wrote this script

#!/bin/bash
 
if [ $# -ne 2 ] ;
 
 then
 
echo "\n      Usage : sh $0 BSSID interface   \n"
 
exit 0;
fi
while true;
 
 do
 
reaver -b $1 -i $2 -vv -N -g 10 -S -a
 
sleep 3603;
 
done

but i got this messages :

bash T.sh
T.sh :line 2: $'\r':command not found
T.sh :line 10: $'\r':command not found
T.sh :line 27: syntax error near unexpected token 'done'
T.sh: line 27: 'done'
Source Link
Educ
  • 413
  • 1
  • 7
  • 11

Bash : syntax error near unexpected token ' done '

I wrote this script

#!/bin/bash
 
if [ $# -ne 2 ] ;
 
 then
 
echo "\n      Usage : sh $0 BSSID interface   \n"
 
exit 0;
fi
while true;
 
 do
 
reaver -b $1 -i $2 -vv -N -g 10 -S -a
 
sleep 3603;
 
done

but i got this messages : enter image description here