variables
Hi all, just wondering if you can help - i have a program that works but now i want to prompt for username and use the store value, but it prompts but doesnt use the variable as far as i can see....
#!/bin/bash
showMenu () {
echo "1) Display user account on the laptop"
echo "2) Display the bash history"
echo "3) Does the Mozilla Firefox history log file exist"
echo "4) quit"
}
var=username
while [ 1 ]
do
showMenu
read CHOICE
case "$CHOICE" in
"1")
cat /etc/group |cut -d: -f1
;;
"2")
cat /home/john403920394/.bash_history
;;
"3") echo "Please enter a username: "
read $username
FILE=$1/home/$username/.mozilla/firefox/b7wuc85h.default/places.sqlite
if [ -f $FILE ];
then
echo "File $FILE this file does exist."
else
echo "File $FILE does not exist."
fi
;;
"4")
exit
;;
esac
done
Would appriciate any help - thank you
|