When I try to use the read
command in Bash like this:
echo hello | read str
echo $str
Nothing echoed, while I think str
should contain the string hello
. Can anybody please help me understand this behavior?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…