here’s a nohup example:
nohup nice -n -19 /bin/bash cidr_to_ipset.sh all_countries.txt 2>&1 >/root/cidr_to_ipset_output.log </dev/null &
nohup is a POSIX command to ignore the HUP (hangup) signal. The HUP signal is, by convention, the way a terminal warns dependent processes of logout.
Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected.
nohup is a low-level utility simply configuring a command to ignore a signal. As seen below, nohup is very far from being a full-featured batch system solving all the problems of running programs asynchronously.