Timeline for Simple Linux upgrade script in Bash
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 28, 2021 at 9:48 | comment | added | Vlastimil Burián |
@iuvbio No, when assigning to a variable like var1=$1 you do not have to quote, ever.
|
|
Jul 22, 2019 at 20:22 | comment | added | iuvbio | Same here, it's only because it wasn't marked that I ask. It does not complain when the variable is used in an assignment or conditional, but it does complain when it is an argument to a command, so I thought that might be a rule. It's also not mentioned in their wiki for SC2086. Anyway, thanks for the clarification. | |
Jul 22, 2019 at 19:10 | comment | added | chicks | It probably should be quoted. I'm surprised shellcheck didn't complain about that. | |
Jul 22, 2019 at 18:24 | comment | added | iuvbio |
Should variables in assignments and conditions not be quoted? i.e. STEP="$1" instead of STEP=$1 . I know this is an old question, but I just came across it and am honestly wondering.
|
|
Nov 13, 2016 at 18:27 | vote | accept | Vlastimil Burián | ||
Nov 13, 2016 at 14:23 | history | answered | chicks | CC BY-SA 3.0 |