"nohup" with a bash script - will programs called from the bash script be interrupted?

Tags:

Answer: 1

23 hours ago

For my work setup, I'm currently ssh'ing into a remote machine. I want to call a certain python program several times with different arguments, so I wrote a simple bash script that looks like this:

get_results.sh:

#!/bin/bash
python generate.py -d 10
python generate.py -d 20
...

My question is, if I run this bash script as nohup ./get_results.sh, then I disconnect from the ssh connection, will all the python programs execute normally?

Answer: 2

27 hours ago

I've since tried this, and it does execute all of the python programs as expected.

The "nohup" command does not need to be included inside the bash script (in front of "python ...".

Added by: Myrl Bergnaum

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9