我正在编写安装脚本,并希望显示脚本的进展状态.
例:
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.
Run Code Online (Sandbox Code Playgroud) bash ×1