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:
variable="Result: `pwd`"
or:
variable="Result: $(pwd)"