-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2037
koalaman edited this page Oct 11, 2016
·
3 revisions
var=grep -c pattern file
var=$(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.