-
Notifications
You must be signed in to change notification settings - Fork 1.9k
SC2037
Joachim Ansorg edited this page Nov 12, 2021
·
3 revisions
var=grep -c pattern filevar=$(grep -c pattern file)To assign the output of a command to a variable, use $(command substitution). Just typing a command after the = sign does not work.
None.
This warning triggers generally for var=value -flag and var=value *glob*. See related warning SC2209 which matches var=commonCommand.