Created
November 19, 2018 13:13
-
-
Save wjt/ef46a0805150736e9d5b5c0bb7b78180 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In eos-factory-reset line 3: | |
| cmd_name=$(basename $0) | |
| ^-- SC2086: Double quote to prevent globbing and word splitting. | |
| In eos-factory-reset line 20: | |
| if [ $? != 0 ]; then | |
| ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. | |
| In eos-factory-reset line 80: | |
| read -p "Are you sure you want to proceed? [y/n] " | |
| ^-- SC2162: read without -r will mangle backslashes. | |
| In eos-factory-reset-helper line 7: | |
| $(dirname $0)/eos-factory-reset-${1,,}-helper | |
| ^-- SC2046: Quote this to prevent word splitting. | |
| ^-- SC2086: Double quote to prevent globbing and word splitting. | |
| ^-- SC2086: Double quote to prevent globbing and word splitting. | |
| In eos-factory-reset-helper line 14: | |
| cmd_name=$(basename $0) | |
| ^-- SC2086: Double quote to prevent globbing and word splitting. | |
| In eos-factory-reset-helper line 28: | |
| . $flag_file | |
| ^-- SC1090: Can't follow non-constant source. Use a directive to specify location. | |
| In eos-factory-reset-users-helper line 4: | |
| for user_row in $(cat /etc/passwd); do | |
| ^-- SC2013: To read lines rather than words, pipe/redirect to a 'while read' loop. | |
| In eos-factory-reset-users-helper line 5: | |
| user=$(echo $user_row | cut -d : -f 1) | |
| ^-- SC2086: Double quote to prevent globbing and word splitting. | |
| In eos-factory-reset-users-helper line 6: | |
| user_id=$(echo $user_row | cut -d : -f 3) | |
| ^-- SC2086: Double quote to prevent globbing and word splitting. | |
| In eos-factory-reset-users-helper line 12: | |
| userdel -r $user | |
| ^-- SC2086: Double quote to prevent globbing and word splitting. | |
| In eos-factory-reset-users-helper line 14: | |
| if [ $? -eq 0 ]; then | |
| ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment