I have the following script:
tail -f nohup.out
echo 5
When I press Ctrl+C on tail -f, the script stops running: the 5 is not printed. How can I run the command echo 5 after I stop the tail command?
I have the following script:
tail -f nohup.out
echo 5
When I press Ctrl+C on tail -f, the script stops running: the 5 is not printed. How can I run the command echo 5 after I stop the tail command?
In bash end the line with a single ampersand to run the command in the background in an async way
tail -f nohup.out &