mirror of
https://github.com/xzb23/aza_shell_script.git
synced 2026-11-22 01:04:36 +08:00
fix: tr读取不到输入
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user