mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1115 (markdown)
24
SC1115.md
Normal file
24
SC1115.md
Normal file
@@ -0,0 +1,24 @@
|
||||
## Remove spaces between # and ! in the shebang.
|
||||
|
||||
### Problematic code:
|
||||
|
||||
```sh
|
||||
# !/bin/sh
|
||||
echo "Hello World"
|
||||
```
|
||||
|
||||
### Correct code:
|
||||
|
||||
```sh
|
||||
#!/bin/sh
|
||||
echo "Hello World"
|
||||
```
|
||||
### Rationale:
|
||||
|
||||
The script has spaces between the `#` and `!` in the shebang. This is not valid.
|
||||
|
||||
Remove the spaces so the OS can correctly recognize the file as a script.
|
||||
|
||||
### Exceptions:
|
||||
|
||||
None.
|
Reference in New Issue
Block a user