So I have a bash script that first asks for a series of three variables from the user. I then want the script to run in the background disconnected from my session, so that when I cut the connection between my laptop and the supercomputer, the script will still run.
The variables are asked for using echo with code that looks like this:
echo "What is limit for low level optimization?" #ask for low limit read low echo "What is limit for high level optimization?" #ask for high limit read high echo "What method?" #ask for method read input
It then goes on to execute a long series of commands.
However I cannot figure out how to successfully disconnect this job from my session. The "disown" command didn't work last time as the files that should have been generated on the steps after I logged out weren't created.
From what I understand, nohup won't work here because that would prevent it from reading any of the input the script asked me for in the beginning.
So is there a way to set this up?