var=$( cat foo.txt )
would store the output of the cat
in variable var
.
var=$( ./myscript )
would store the output of myscript
in the same variable.
var=$( cat foo.txt )
would store the output of the cat
in variable var
.
var=$( ./myscript )
would store the output of myscript
in the same variable.