EN
Bash - run command in string and assign result to variable
0 points
In this article, we would like to show you how to run command in string and assign result to variable in Bash.
Quick solution:
xxxxxxxxxx
1
variable="Result: `pwd`"
or:
xxxxxxxxxx
1
variable="Result: $(pwd)"