diff --git a/PyTorch/built-in/others/OpenFold_for_PyTorch/test/train_openfold_8p.sh b/PyTorch/built-in/others/OpenFold_for_PyTorch/test/train_openfold_8p.sh index 7ae8edd30f7150c844da193c82be1be742b62943..2248ff95a5d1680fc4997e613398252e7eec3765 100644 --- a/PyTorch/built-in/others/OpenFold_for_PyTorch/test/train_openfold_8p.sh +++ b/PyTorch/built-in/others/OpenFold_for_PyTorch/test/train_openfold_8p.sh @@ -42,11 +42,11 @@ wait format_time=$(tac "openfold_train_8p.log" | grep -m 1 'Epoch' | awk -F'[][]' '{split($2, time, "<"); print time[1]}') # 计算总秒数 -if [[ $format_time =~ ^[0-9]{2}:[0-9]{2}$ ]]; then +if [[ $format_time =~ ^[0-9]{1, 2}:[0-9]{1, 2}$ ]]; then #分:秒 IFS=':' read -r minutes seconds <<< "$format_time" total_seconds=$((minutes * 60 + seconds)) -elif [[ $format_time =~ ^[0-9]{2}:[0-9]{2}:[0-9]{2}$ ]]; then +elif [[ $format_time =~ ^[0-9]{1, 2}:[0-9]{1, 2}:[0-9]{1, 2}$ ]]; then #时:分:秒 IFS=':' read -r hours minutes seconds <<< "$format_time" total_seconds=$((hours * 3600 + minutes * 60 + seconds))