📄 dbfunctions
字号:
function addon () { # Function defined in file dbfunctions
while true
do
echo "Adding information "
echo "Type the full name of employee "
read name
echo "Type address for employee "
read address
echo "Type start date for employee (4/10/88 ) :"
read startdate
echo $name:$address:$startdate
echo -n "Is this correct? "
read ans
case "$ans" in
[Yy]*)
echo "Adding info..."
echo $name:$address:$startdate>>datafile
sort -u datafile -o datafile
echo -n "Do you want to go back to the main menu? "
read ans
if [[ $ans == [Yy] ]]
then
return # Return to calling program
else
continue # Go to the top of the loop
fi
;;
*)
echo "Do you want to try again? "
read answer
case "$answer" in
[Yy]*) continue;;
*) exit;;
esac
;;
esac
done
} # End of function definition
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -