Hello, i feel this should be easy problem to fix, ive just hit a brick wall. This is my first bunch of scripts. What they are is a menu for automation of wireless cracking and cleanup script. The rest work fine so im now confused why im having so much trouble with the *easy* parts. I am running these scripts on Back Trace 5 - R1 let me know if you need any other information
menu.sh
-------
green="\e[1;92m"
echo -e $green
echo "*********************************************"
echo "* Mark's Wireless Access Point Cracker *"
echo "*********************************************"
echo "* a) Brute-Force Wireless AP *"
echo "* b) Update Wordlist (newlist>biglist) *"
echo "* c) Clean-Up (removes dump & Backup files) *"
echo "* d) Exit *"
echo "*********************************************"
read -p "Please pick an option. " ABCD
echo $ABCD
Error
------
': not a valid identifier `ABCD
Strange, Ive used read -p in my main script & it worked. I've tried different variables, lowercase / uppercase. ive also tried with "" around variable name. This error occurs once a value is entered in terminal. Im stuck
cleanup.sh
----------
green="\e[1;92m"
echo -e $green"Clearing Old Data...."
rm /media/8GB/wl_tools/wordlist/*.bak
rm /media/8GB/wl_tools/wordlist/newlist_sort
rm -r /media/8GB/wl_tools/dump/*
echo "Complete!"
Error
------
rm: cannot remove `/media/8GB/wl_tools/wordlist/*.bak\r': No such file or directory
rm: cannot remove `/media/8GB/wl_tools/wordlist/newlist_sort\r': No such file or directory
rm: cannot remove `/media/8GB/wl_tools/dump/*\r': No such file or directory
This error occurs when running in terminal, if i run these commands manually in terminal works perfectly. seems to \r to the end of the directory i have no idea why or what it means, but it seems to be the reason why it is failing.
Thanks for your help.
ps. These are my first bunch of scripts so any other tips great appreciated too