I will often run a simple monitoring task like the following:
(sleep 600 && ls -lh /path/to/files)&
Is it possible to have the process de-background itself part way in? For example, to grab the job id into
$jobid (or similar), and then when the
sleep finishes, do an
This may require some more complex bash-fu, I am aware, but any solutions would be nice to see (especially if it's possible to only
fg if there is no other interactive process running).