Skip to content

Instantly share code, notes, and snippets.

@bluekezza
bluekezza / nohup_function.sh
Created June 9, 2020 11:45
Calling a function using nohup
function function_to_run {
while true
do
echo "function1"
sleep 1
done
}
function main {
( # start a group. The statements will be executed in a sub-shell (see https://www.gnu.org/software/bash/manual/html_node/Command-Grouping.html#Command-Grouping)