fix: tr读取不到输入

This commit is contained in:
xzb23 committed 2026-10-22 20:31:13 +08:00
1 parent 10aff7c6d6
commit e281824468
1 file changed
+1 -1
+1 -1
View File
@@ -7,7 +7,7 @@ echo "
read -p "Y/n: " flag
if [ -z "$flag" ]; then
echo "===Start==="
elif [ "$(tr [:upper:] [:lower:]) \"$flag\"" == "y" ]; then
elif [ "$(printf "%s" \"$flag\" | tr [:upper:] [:lower:])" == "y" ]; then
echo "===Start==="
else
exit 0