我正在编写安装脚本,并希望在脚本进行过程中显示脚本的状态.
原文链接:https://www.f2er.com/bash/386966.html例:
var1="pending" var2="pending" var3="pending" print_status () { echo "Status of Item 1 is: "$var1"" echo "Status of Item 2 is: "$var2"" echo "Status of Item 3 is: "$var3"" } code that does something and then refreshes the output above as the status of each variable changes.