以此代码为例.假装它是一个HTML /文本文件,如果我想知道回显出现的总次数,我怎么能用bash做呢?
@H_403_1@new_user()
{
echo "Preparing to add a new user..."
sleep 2
adduser # run the adduser program
}
echo "1. Add user"
echo "2. Exit"
echo "Enter your choice: "
read choice
case $choice in
1) new_user # call the new_user() function
;;
*) exit
;;
esac