This \…. SC1001
- Code
SC1001- Severity
- info
- Message
This \{}
Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
The lint rules of Bash, with what each one finds. This page has 314 cards.
SC1001SC1001This \{}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1003SC1003Want to escape a single quote? echo 'This is how it'\''s done'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1008SC1008This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh/'busybox sh'. Add a 'shell' directive to specify.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1010SC1010Use semicolon or linefeed before '{}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1012SC1012\{}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1014SC1014Use 'if cmd; then ..' to check exit code, or 'if [[ $(cmd) == .. ]]' to check output.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1017SC1017Literal carriage return. Run script through tr -d '\r' .Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1018SC1018This is a unicode space. Delete and retype it.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1019SC1019Expected this to be an argument to the unary condition.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1027SC1027Expected another argument for this operator.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1028SC1028In [..] you have to escape \( \) or preferably combine [..] expressions.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1029SC1029In [[..]] you shouldn't escape ( or ).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1033SC1033Test expression was opened with double [[ but closed with single ]. Make sure they match.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1034SC1034Test expression was opened with single [ but closed with double ]]. Make sure they match.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1035ShellCheck has 2 messages for this code.
SC1035You are missing a required space here.You need a space after the {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1036SC1036'(' is invalid here. Did you forget to escape it?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1037SC1037Braces are required for positionals over 9, e.g. ${10}.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1039SC1039Remove indentation before end token (or use <<- and indent with tabs).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1040SC1040When using <<-, you can only indent with tabs.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1041SC1041Found '{}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1042SC1042Close matches include '{}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1043SC1043Found {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1044SC1044Couldn't find end token `{}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1045SC1045It's not 'foo &; bar', just 'foo & bar'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1046SC1046Couldn't find 'fi' for this 'if'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1047SC1047Expected 'fi' matching previously mentioned 'if'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1048SC1048Can't have empty {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1049ShellCheck has 2 messages for this code.
SC1049Did you forget the 'then' for this 'if'?Did you forget the 'then' for this 'elif'?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1050SC1050Expected 'then'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1051SC1051Semicolons directly after 'then' are not allowed. Just remove it.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1052SC1052Semicolons directly after 'then' are not allowed. Just remove it.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1053SC1053Semicolons directly after 'else' are not allowed. Just remove it.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1054SC1054You need a space after the '{'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1055SC1055You need at least one command here. Use 'true;' as a no-op.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1056SC1056Expected a '}'. If you have one, try a ; or \n in front of it.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1057SC1057Did you forget the 'do' for this loop?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1058SC1058Expected 'do'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1059SC1059Semicolon is not allowed directly after 'do'. You can just delete it.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1060SC1060Can't have empty do clauses (use 'true' as a no-op).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1061SC1061Couldn't find 'done' for this 'do'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1062SC1062Expected 'done' matching previously mentioned 'do'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1063SC1063You need a line feed or semicolon before the 'do'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1064SC1064Expected a { to open the function definition.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1065SC1065Trying to declare parameters? Don't. Use () and refer to params as $1, $2..Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1066SC1066Don't use $ on the left side of assignments.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1070SC1070Parsing stopped here. Mismatched keywords or invalid parentheses?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1071SC1071ShellCheck only supports sh/bash/dash/ksh/'busybox sh' scripts. Sorry!Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1075SC1075Use 'elif' instead of 'else if' (or put 'if' on new line if nesting).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1080ShellCheck has 2 messages for this code.
SC1080When breaking lines in [ ], you need \ before the linefeed.You need \ before line feeds to break lines in [ ].Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1087SC1087Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1088SC1088Parsing stopped here. Invalid use of parentheses?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1089SC1089Parsing stopped here. Is this keyword correctly matched up?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1092SC1092Stopping at 100 'source' frames :OSource: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1095SC1095You need a space or linefeed between the function name and body.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1097SC1097Unexpected ==. For assignment, use =. For comparison, use [/[[. Or quote for literal string.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1098SC1098Quote/escape special characters when using eval, e.g. eval "a=(b)".Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1101SC1101Delete trailing spaces after \ to break line (or use quotes for literal space).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1102SC1102Shells disambiguate $(( differently or not at all. For $(command substitution), add space after $( . For $((arithmetics)), fix parsing errors.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1105SC1105Shells disambiguate (( differently or not at all. For subshell, add spaces around ( . For ((, fix parsing errors.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1106SC1106In arithmetic contexts, use {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1107SC1107This directive is unknown. It will be ignored.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1109SC1109This is an unquoted HTML entity. Replace with corresponding character.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1110SC1110This is a unicode quote. Delete and retype it (or quote to make literal).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1116SC1116Missing $ on a $((..)) expression? (or use ( ( for arrays).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1118SC1118Delete whitespace after the here-doc end token.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1119SC1119Add a linefeed between end token and terminating ')'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1120SC1120No comments allowed after here-doc token. Comment the next line instead.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1121SC1121Add ;/& terminators (and other syntax) on the line with the <<, not here.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1122SC1122Nothing allowed after end token. To continue a command, put it on the line with the <<.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1123SC1123ShellCheck directives are only valid in front of complete compound commands, like 'if', not e.g. individual 'elif' branches.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1124SC1124ShellCheck directives are only valid in front of complete commands like 'case' statements, not individual case branches.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1125SC1125Invalid key=value pair? Ignoring the rest of this directive starting here.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1126SC1126Place shellcheck directives before commands, not after.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1127SC1127Was this intended as a comment? Use # in sh.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1128SC1128The shebang must be on the first line. Delete blanks and move comments.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1131SC1131Use 'elif' to start another branch.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1132SC1132This & terminates the command. Escape it or add space after & to silence.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1138SC1138Remove spaces between {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1140SC1140Unexpected parameters after condition. Missing &&/||, or bad expression?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1141SC1141Unexpected tokens after compound command. Bad redirection or missing ;/&&/||/|?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1142SC1142Use 'done < <(cmd)' to redirect from process substitution (currently missing one '<').Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1143SC1143This backslash is part of a comment and does not continue the line.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1144SC1144external-sources can only be enabled in .shellcheckrc, not in individual files.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1145SC1145Unknown external-sources value. Expected true/false.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC1146SC1146Unknown extended-analysis value. Expected true/false.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2000SC2000See if you can use ${#variable} instead.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2001SC2001See if you can use ${variable//search/replace} instead.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2002SC2002Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2004SC2004$/${} is unnecessary on arithmetic variables.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2005SC2005Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2007SC2007Use $((..)) instead of deprecated $[..]Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2009SC2009Consider using pgrep instead of grepping ps output.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2010SC2010Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2011SC2011Use 'find .. -print0 | xargs -0 ..' or 'find .. -exec .. +' to allow non-alphanumeric filenames.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2012SC2012Use find instead of ls to better handle non-alphanumeric filenames.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2013SC2013To read lines rather than words, pipe/redirect to a 'while read' loop.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2014SC2014This will expand once before find runs, not per file found.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2015SC2015Note that A && B || C is not if-then-else. C may run when A is true.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2017SC2017Increase precision by replacing a/b*c with a*c/b.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2018SC2018Use '[:lower:]' to support accents and foreign alphabets.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2019SC2019Use '[:upper:]' to support accents and foreign alphabets.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2020SC2020tr replaces sets of chars, not words (mentioned due to duplicates).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2021SC2021Don't use [] around classes in tr, it replaces literal square brackets.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2023SC2023The shell may override 'time' as seen in man time(1). Use 'command time ..' for that one.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2025SC2025Make sure all escape sequences are enclosed in \[..\] to prevent line wrapping issuesSource: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2026SC2026This word is outside of quotes. Did you intend to 'nest '"'single quotes'"' instead'? Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2027SC2027The surrounding quotes actually unquote this. Remove or escape them.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2028SC2028echo may not expand escape sequences. Use printf.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2030SC2030Modification of {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2035SC2035Use ./*glob* or -- *glob* so names with dashes won't become options.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2036SC2036If you wanted to assign the output of the pipeline, use a=$(b | c) .Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2037SC2037To assign the output of a command, use var=$(cmd) .Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2041SC2041This is a literal string. To run as a command, use $(..) instead of '..' . Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2042SC2042Use spaces, not commas, to separate loop elements.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2043SC2043This loop will only ever run once. Bad quoting or missing glob/expansion?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2044SC2044For loops over find output are fragile. Use find -exec or a while read loop.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2045SC2045Iterating over ls output is fragile. Use globs.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2046SC2046Quote this to prevent word splitting.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2048ShellCheck has 2 messages for this code.
SC2048Use "$@" (with quotes) to prevent whitespace problems.Use "${array[@]}" (with quotes) to prevent whitespace problems.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2049SC2049=~ is for regex, but this looks like a glob. Use = instead.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2050SC2050This expression is constant. Did you forget the $ on a variable?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2051SC2051Bash doesn't support variables in brace range expansions.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2053SC2053Quote the right-hand side of {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2054SC2054Use spaces, not commas, to separate array elements.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2055SC2055You probably wanted {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2056SC2056You probably wanted && here, otherwise it's always true.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2057SC2057Unknown binary operator.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2058SC2058Unknown unary operator.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2060SC2060Quote parameters to tr to prevent glob expansion.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2061SC2061Quote the parameter to {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2062SC2062Quote the grep pattern so the shell won't interpret it.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2063SC2063Grep uses regex, but this looks like a glob.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2064SC2064Use single quotes, otherwise this expands now rather than when signalled.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2065SC2065This is interpreted as a shell file redirection, not a comparison.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2066SC2066Since you double quoted this, it will not word split, and the loop will only run once.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2067SC2067Missing ';' or + terminating -exec. You can't use |/||/&&, and ';' has to be a separate, quoted argument.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2069SC2069To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2070SC2070-n doesn't work with unquoted arguments. Quote or use [[ ]].Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2073SC2073Escape \{}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2074SC2074Can't use =~ in [ ]. Use [[..]] instead.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2075SC2075Escaping {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2077SC2077You need spaces around the comparison operator.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2078SC2078This expression is constant. Did you forget a $ somewhere?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2079SC2079(( )) doesn't support decimals. Use bc or awk.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2080SC2080Numbers with leading 0 are considered octal.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2082SC2082To expand via indirection, use arrays, ${!name} or (for sh only) eval.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2083SC2083Don't add spaces after the slash in './file'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2084SC2084Remove '$' or use '_=$((expr))' to avoid executing output.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2086SC2086Double quote to prevent globbing and word splitting.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2087SC2087Quote '{}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2088SC2088Tilde does not expand in quotes. Use $HOME.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2091SC2091Remove surrounding $() to avoid executing output (or use eval if intentional).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2092SC2092Remove backticks to avoid executing output (or use eval if intentional).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2093SC2093Remove "exec " if script should continue after this command.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2096SC2096On most OS, shebangs can only specify a single parameter.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2097SC2097This assignment is only seen by the forked process.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2098SC2098This expansion will not see the mentioned assignment.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2101SC2101Named class needs outer [], e.g. [[:digit:]].Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2102SC2102Ranges can only match single chars (mentioned due to duplicates).Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2103SC2103Use a ( subshell ) to avoid having to cd back.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2104SC2104In functions, use return instead of {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2107SC2107Instead of [ a && b ], use [ a ] && [ b ].Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2108SC2108In [[..]], use && instead of -a.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2109SC2109Instead of [ a || b ], use [ a ] || [ b ].Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2110SC2110In [[..]], use || instead of -o.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2111SC2111ksh does not allow 'function' keyword and '()' at the same time.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2112SC2112'function' keyword is non-standard. Delete it.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2113SC2113'function' keyword is non-standard. Use 'foo()' instead of 'function foo'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2114SC2114Warning: deletes a system directory.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2115SC2115Use "${var:?}" to ensure this never expands to {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2118SC2118Ksh does not support |&. Use 2>&1 |.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2121SC2121To assign a variable, use just 'var=value', no 'set ..'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2123SC2123PATH is the shell search path. Use another name.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2126SC2126Consider using 'grep -c' instead of 'grep|wc -l'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2139SC2139This expands when defined, not when used. Consider escaping.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2140SC2140Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2141ShellCheck has 2 messages for this code.
SC2141This backslash is literal. Did you mean IFS={}This IFS value contains {}Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2145SC2145Argument mixes string and array. Use * or separate argument.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2146SC2146This action ignores everything before the -o. Use \( \) to group.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2147SC2147Literal tilde in PATH works poorly across programs.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2148SC2148Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2151SC2151Only one integer 0-255 can be returned. Use stdout for other data.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2152SC2152Can only return 0-255. Other data should be written to stdout.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2155SC2155Declare and assign separately to avoid masking return values.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2156SC2156Injecting filenames is fragile and insecure. Use parameters.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2158SC2158[ false ] is true. Remove the brackets.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2159SC2159[ 0 ] is true. Use 'false' instead.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2160SC2160Instead of '[ true ]', just use 'true'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2161SC2161Instead of '[ 1 ]', use 'true'.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2162SC2162read without -r will mangle backslashes.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2165SC2165This nested loop overrides the index variable of its parent.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2166ShellCheck has 2 messages for this code.
SC2166Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2167SC2167This parent loop has its index variable overridden.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2168SC2168'local' is only valid in functions.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2174SC2174When used with -p, -m only applies to the deepest directory.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2175SC2175Quote this invalid brace expansion since it should be passed literally to eval.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2176SC2176'time' is undefined for pipelines. time single stage or bash -c instead.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2177SC2177'time' is undefined for compound commands, time sh -c instead.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2178SC2178Variable was used as an array but is now assigned a string.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.
SC2179SC2179Use array+=("item") to append items to an array.Source: github.com, www.shellcheck.net. JSON record. This entry is a card. Help write this page.