Create a script, `job-regist.sh`, that will be able to monitor a specific background job.
Create a script, `job-regist.sh`, that will be able to launch and monitor a specific job.
The script needs to track the status of the first jobs spawned by the current terminal and save the status into a `job.log` file every second. It must append the new update without modifying the previous content.
The script needs to launch a specific binary and track its status saving it into a `job.log` file every second. It must append the new update without modifying the previous content.
Each update needs to be appended to the file with the current format: `YYYY-MM-DD hh:mm:ss - <job status>`
The script should stop running as soon as the job it is tracking ends.
If the script is used with a wrong number of argument it should exit with a status code `1` and print the following error message: `"Error: wrong number of arguments!"`.