I have just learned about nohup
which is so far very useful - my jobs aren't crashing due to my ssh session unintentionally disconnecting.
Can someone tell me what happens if I do ctrl-C
after submitting a nohup
job? I'm hoping it continues to run. After starting the job it says
$ nohup: appending output to ‘nohup.out'
But it does not take me to a fresh line of input to do other commands.
Can anyone explain why the &
is necessary at the end of my command?
nohup sh -c 'for file in ../orig_data/merged/*Inp*.gz; do zcat $file | bowtie2 -p 8 -q -x hg_mm -U - -S "${file:20:-9}".sam; done' &
EDIT:This nohup command is within a bash script executed as ./job.sh
. So if I kill this bash script, does it also kill my nohup command?