一个简单的shell程序,不知为什么错了
#! /bin/bash#a function of
echo "P: To display current directory"
echo "S: To display the name of running file"
echo "D: To display today's date and present time"
echo "L: To see the listing of files in your working directory"
echo "W: To see who is logged in"
echo "Q: To quit this program"
echo "Enter your option and hit:"
read char
until [$char = 'Q']
do
# echo "Enter your option and hit:"
# read char
case $char in
P|p) pwd
;;
S|s) ps
;;
D|d) date
;;
L|l) ls
;;
W|w) who
;;
*) echo "Please input a correct command!"
esac
echo "Enter your option and hit:"
read char
done
其中 until [$char = 'Q']错在哪,麻烦解释清楚