Open Firfr opened 2 days ago
麻烦提供一下相关的截图或其他信息,帮忙我们更好地定位问题。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Please provide relevant screenshots or other information to help us better locate the problem.
我模拟了一个输出进度条的代码
#!/bin/bash
# 进度条函数
print_progress_bar() {
local percent=$1
local width=50 # 进度条的宽度
local filled=$((percent * width / 100))
local bar=""
for ((i=0; i<filled; i++)); do
bar+="█"
done
for ((i=filled; i<width; i++)); do
bar+=" "
done
echo -ne "\r[ ${bar} ] ${percent}%"
}
# 模拟进度
for percent in $(seq 0 1 100); do
print_progress_bar $percent
sleep 0.05 # 模拟进度的延迟
done
echo # 最后换行
在计划任务中的输出
手动执行后的输出
感谢反馈,这里是编码的问题,下个版本优化
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Thanks for the feedback. This is a coding problem and will be optimized in the next version.
1Panel Version
社区版: v1.10.21-lts
Please describe your needs or suggestions for improvements
在计划任务中执行 例如
docker pull xhofe/alist:latest
时,在报告记录中,其中进度条的部分显示不正常Please describe the solution you suggest
No response
Additional Information
No response