8
触发新行的动作我现在有这个使用读不上终端
$PROMPT=">"
while read -p "${PROMPT}" line; do
echo -en "\r"
some_info_printout($line)
echo -en "\n${PROMPT}"
done
这使输出这样
>typed input
INFO OUT ["typed input"]
>more text
INFO OUT ["more text"]
>
我想的是做一个read
,并忽略换行符等动作精确的文本可以覆盖现有的行
INFO OUT ["typed input"]
INFO OUT ["more text"]
>
任何帮助将赞赏。
'-s'会超过上限,因为程序难以正确输入到 – 2012-02-03 20:03:58