shell 用户输入值REPLY变量值传递给 read 变量

悟透 / 2023-08-16 / 原文

shell 变量值传递给 read 变量

read  selChoices <<<"$REPLY"
echo $selChoices

"$REPLY" 是用户输入的值,它通过here-string(<<<)传递给read命令





参考:
https://qa.1r1g.com/sf/ask/2128520901/