Hands-on task
Bring the script to zero warnings
The script /root/release.sh writes a line of the form <message> at <timestamp> to /tmp/log.txt (the message is the first argument). It has several problems at once that shellcheck complains about. Fix them all so that shellcheck produces not a single warning and the script still writes the message and timestamp to the same file. Open the script in the Editor tab above the terminal, and run shellcheck in the terminal.
- shellcheck
- quoting variables
- command substitution
- cd
- bash