mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-04 03:46:06 +08:00
Created SC1042 (markdown)
26
SC1042.md
Normal file
26
SC1042.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
## Found `eof` further down, but not entirely by itself.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cat << eof
|
||||||
|
Hello World
|
||||||
|
eof -vE
|
||||||
|
```
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cat << eof -v E
|
||||||
|
Hello World
|
||||||
|
eof
|
||||||
|
```
|
||||||
|
### Rationale:
|
||||||
|
|
||||||
|
Your here document isn't properly terminated. There is a line containing the token you've chosen, but it needs to be on a separate line with no leading or trailing spaces, flags or other characters.
|
||||||
|
|
||||||
|
Make sure the token you've chosen has no leading or trailing characters of any kind, including spaces. Either delete or move them.
|
||||||
|
|
||||||
|
### Exceptions:
|
||||||
|
|
||||||
|
None.
|
Reference in New Issue
Block a user