mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Add four varying examples found in the wild of problematic code
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
trap "echo \"Finished on $(date)\"" EXIT
|
trap "echo \"Finished on $(date)\"" EXIT
|
||||||
|
trap "rm -fr '$testdir1' '$testdir2'" $TRAP_SIGNALS
|
||||||
|
trap "rm $tmp" $TRAP_SIGNALS
|
||||||
|
trap "${remove_aar_temp}" SIGKILL SIGTERM SIGQUIT EXIT
|
||||||
|
trap "$(shopt -p extglob)" RETURN
|
||||||
```
|
```
|
||||||
|
|
||||||
### Correct code:
|
### Correct code:
|
||||||
|
Reference in New Issue
Block a user