read cmd 超乎預期求原因 - Linux

Table of Contents

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


感覺跟該目錄下檔名有關耶?!

有人知道原因嗎?

感謝

----
Sent from BePTT on my iPhone 12

--

All Comments

Todd Johnson avatarTodd Johnson2021-12-27
Connor avatarConnor2022-01-01
thank first floor
Christine avatarChristine2022-01-06
echo "$REPLY"