1
在没有劫持提示的情况下从后台进程中回显进度
考虑简单的脚本hello: #!/bin/bash echo 'hello world!' 现在从bash开始,如果我尝试在后台运行此命令: $ hello & [1] 12345 $ hello world! █ <--- prompt is stuck here until I hit enter! [1]+ Done $ █ <--- prompt back to normal 我宁愿看到: $ hello & [1] 12345 [1]+ hello world! [1]+ Done $ █ <--- prompt normal the …