我已经看到notused
并discard
使用了该read
命令,但是找不到这两个关键字的定义位置。他们不在文档中read
https://unix.stackexchange.com/a/7214/393711
while read -t 0 notused; do
read input
echo "ignoring $input"
done
https://superuser.com/questions/276531/clear-stdin-before-reading
read -t 1 -n 10000 discard
read -p "Give me some input: " input
这些根本不是关键字; 它们只是变量名。它们适合该位置的语法[name ...]
,其中可以为读取的内容提供任意名称(包括有意暗示不应使用数据的名称!)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句