[問題] read cmd 超乎預期求原因

作者: scitamehtam (scitamehtam)   2021-12-22 12:08:48
1.
在當前目錄下建立檔案
abs
2.
read
input:[abc]
echo $REPLY
顯示:a
3.
read
input: [cba]bs
echo $REPLY
顯示:abs
4.
read
input: [k]bs
echo $REPLY
顯示:[k]bs
5.
read
input: [cba]bs
echo “$REPLY”
顯示: [cba]bs
感覺跟該目錄下檔名有關耶?!
有人知道原因嗎?
感謝
作者: soem (流水)   2021-12-23 03:52:00
作者: scitamehtam (scitamehtam)   2021-12-23 12:15:00
thank first floor
作者: Gold740716 (項為之強)   2020-01-03 14:45:00
echo "$REPLY"

Links booklink

Contact Us: admin [ a t ] ucptt.com