mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1104 (markdown)
25
SC1104.md
Normal file
25
SC1104.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
## Use #!, not just !, for the shebang.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
!/bin/sh
|
||||||
|
echo "Hello"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
#!/bin/sh
|
||||||
|
echo "Hello"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Rationale:
|
||||||
|
|
||||||
|
You appear to be specifying an interpreter in a shebang, but it's missing the hash part. The shebang must always start with `#!`.
|
||||||
|
|
||||||
|
Even the name "shebang" itself comes from "hash" (`#`) + "bang" (`!`).
|
||||||
|
|
||||||
|
### Exceptions:
|
||||||
|
|
||||||
|
None.
|
Reference in New Issue
Block a user