mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC1082 (markdown)
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
This is an encoding error that can't be seen in the script itself, but `cat -v` will show three bytes of garbage at the start of the file:
|
This is an encoding error that can't be seen in the script itself, but `cat -v` will show three bytes of garbage at the start of the file:
|
||||||
|
|
||||||
```
|
```console
|
||||||
$ cat -v file
|
$ cat -v file
|
||||||
M-oM-;M-?#!/bin/bash
|
M-oM-;M-?#!/bin/bash
|
||||||
echo "hello world"
|
echo "hello world"
|
||||||
@@ -18,7 +18,7 @@ The code is correct when this garbage does not appear.
|
|||||||
|
|
||||||
Some editors may save a file with a [Byte Order Mark](https://en.wikipedia.org/wiki/Byte_order_mark) to mark the file as UTF-8. Shells do not understand this and will give errors on the first line:
|
Some editors may save a file with a [Byte Order Mark](https://en.wikipedia.org/wiki/Byte_order_mark) to mark the file as UTF-8. Shells do not understand this and will give errors on the first line:
|
||||||
|
|
||||||
```
|
```console
|
||||||
$ bash myscript
|
$ bash myscript
|
||||||
myscript: line 1: #!/bin/sh: No such file or directory
|
myscript: line 1: #!/bin/sh: No such file or directory
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user