I am trying to run a script in the background even after closing the terminal. I have searched and searched and tried nohup and disown but neither
nohup
disown
Starting a subshell and running the nohup command from there seems to avoid having Terminal kill it off when exiting.
bash -c "nohup sh -c 'while true; do date; sleep 1; done' &"
Not very elegant, but works for me.