Skip to content

Files

Latest commit

 

History

History
27 lines (17 loc) · 534 Bytes

SC1114.md

File metadata and controls

27 lines (17 loc) · 534 Bytes

Pattern: Leading whitespace before the shebang

Issue: -

Description

The script has leading spaces before the shebang (#!). This is not allowed.

The #! should be the first two bytes in the file, as they're used as a file signature by the OS to determine whether a file is a script.

Example of incorrect code:

  #!/bin/sh
echo "Hello world"

Example of correct code:

#!/bin/sh
echo "Hello World"

Further Reading