I need bash shell command output to the variable. For example, I got a command called repo-rate.sh and I need to output of that command stored to the variable named $output
instead of the my server monitor. Is it possible?
$ cat /tmp/a.sh
echo aap
echo noot
echo mies
then
$ OUTPUT=$(/tmp/a.sh)
$ echo $OUTPUT
aap noot mies