Reading a script before you run it
hardpar 1 commandGuard the script
clean.sh runs rm -rf "$BUILD"/* and nothing sets BUILD. Add the one line that makes it fail instead of emptying this directory, immediately after the shebang. Do not run it to find out.
Goal
0 / 1 commands
clean.sh runs rm -rf "$BUILD"/*, and BUILD is set nowhere. Add set -u immediately after its shebang line, so that it fails instead of emptying the directory. Do not run it.
- ·Uses
sed - ·Does not use
rm
$
| Mode | Links | Size | Name |
|---|---|---|---|
| -rwxr-xr-x | 1 | 69 | clean.sh |
| -rw-r--r-- | 1 | 39 | notes.txt |
| -rw-r--r-- | 1 | 9 | report.txt |