震惊,nohup 这样写不用回车

nohup /opt/test/xunhaun.sh &> run.log  &

脚本内容

[root@node1 /opt/test]# cat xunhaun.sh 
#!/bin/bash
a=0
while true;do
echo $a
sleep 1
let a++
done
posted @ 2021-10-22 15:19  Gshelldon  阅读(319)  评论(2编辑  收藏  举报