Linux Shell scripting: Storing the output of a command line program

138 views Asked by At

The following command returns 2 lines and those are the temperatures of my CPU's:

acpi -t

How would I go about storing those 2 lines in a variable in a bash script so I can work with them?

1

There are 1 answers

3
RBH On

Did u try this ?

var=$(acpi -t)