mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Added shebangs to examples
@@ -3,12 +3,14 @@
|
||||
### Problematic code:
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
[ "$var" =~ .*foo[0-9]* ]
|
||||
```
|
||||
|
||||
### Correct code:
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
expr "$var" : ".*foo[0-9]*" > /dev/null
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user