Hands-on task
This task is step 10 of the course “Bash scripts: from a loop to a robust script”
Output to both the screen and a log
The script /root/job.sh writes to both stdout and stderr. Write a wrapper /root/run_job.sh that runs job.sh so that all of its output — both streams, stdout and stderr — is at the same time shown on screen (on the wrapper's stdout) and written to /root/job.log.
What you'll practise:
- tee
- 2>&1
- stream redirection
- stdout/stderr
- pipes