带有双分号的行中的程序错误,说明意外标记附近的语法错误。有什么建议么?
#!/bin/bash
echo "Enter the access password..."
while
do
read INPUT_STRING
case $INPUT_STRING in
##CORRECT PASSWORD##
lux)
ls -l -S > directory.txt
echo "Enter your username..."
read a
sed '1 i\ $a' directory.txt
date=`date`
sed '2 i\ $date' directory.txt
date=
echo "The operation has completed successfully"
;;
##INCORRECT PASSWORD##
*)
x=1
while [ $x -le 3 ]
do
echo "Incorrect Password, try again. The program will exit after 3 failed attempts."
x=$(( $x + 1 ))
sleep 2
echo "Enter the access password..."
if x=3
then exit
fi
;;
esac
done
echo
echo "Process Complete, Goodbye!"