-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path06-shellcheck.sh
More file actions
19 lines (14 loc) · 645 Bytes
/
06-shellcheck.sh
File metadata and controls
19 lines (14 loc) · 645 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
echo '
#########################################
## Example 6.1: #
## Try running shellcheck on this file! #
## $ shellcheck 06-shellcheck.sh #
#########################################
'
# shellcheck installation instructions: https://github.com/koalaman/shellcheck#installing
filename="filename with spaces.txt"
ls $filename # this is an error, shellcheck will catch it!
# exercise: Try googling "SC2086" for an explanation of that error
# there's a list of every shellcheck error here:
# https://gist.github.com/nicerobot/53cee11ee0abbdc997661e65b348f375#file-_shellcheck-md