Score:0

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

cn flag

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?

Score:0
cn flag

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 ...".

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.