how to continue run script after tail -f command

前端 未结 6 866
攒了一身酷
攒了一身酷 2021-01-18 09:55

I have the following script:

tail -f nohup.out
echo 5

When I press Ctrl+C on tail -f, the script stops r

6条回答
  •  既然无缘
    2021-01-18 10:09

    You could just start the tail in a new shell, like so:

    #!/bin/bash
    bash -i -c 'tail -f nohup.out'
    echo 5
    

提交回复
热议问题