All Questions

Filter by
Sorted by
Tagged with
1
vote
1answer
136 views

Define variable using read from stdin of heredoc

I am trying to store Available and Total Memory into variables in a script file as follows, read -r Available Total <<EOT $(free -m | awk '/^Mem/{print $7; print $2;}') EOT $ echo $Total $ ...