Hands-on task
This task is step 4 of the course “Clean scripts: shellcheck”
Replace the deprecated backticks
The script /root/stamp.sh writes the current date to /root/out.txt, but it uses the deprecated backtick command substitution, which shellcheck warns about. Rewrite the substitution using the modern syntax so that the linter stays silent and the script still writes the date.
What you'll practise:
- shellcheck
- command substitution
- $(...)
- bash
- linting