Sensors and saving to var
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Need some help i am trying to get sensors and add both answers to varible in a bash script.
i got this from here but doesnt quite help me with my needs.
[root@**** ~]# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +40.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 1: +45.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 2: +50.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 8: +47.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 9: +48.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 10: +45.0ðC (high = +80.0ðC, crit = +96.0ðC)
coretemp-isa-0001
Adapter: ISA adapter
Core 0: +36.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 1: +44.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 2: +41.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 8: +42.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 9: +44.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 10: +48.0ðC (high = +80.0ðC, crit = +96.0ðC)
[root@*** ~]# sensors | sed -rn 's/.Core 0:s+.([0-9]+)./1/p'
40
36
i need 40 and 36 saved into vars. is there anyway to add both them in vars for a bash script.
bash sensors
New contributor
add a comment |Â
up vote
0
down vote
favorite
Need some help i am trying to get sensors and add both answers to varible in a bash script.
i got this from here but doesnt quite help me with my needs.
[root@**** ~]# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +40.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 1: +45.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 2: +50.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 8: +47.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 9: +48.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 10: +45.0ðC (high = +80.0ðC, crit = +96.0ðC)
coretemp-isa-0001
Adapter: ISA adapter
Core 0: +36.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 1: +44.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 2: +41.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 8: +42.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 9: +44.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 10: +48.0ðC (high = +80.0ðC, crit = +96.0ðC)
[root@*** ~]# sensors | sed -rn 's/.Core 0:s+.([0-9]+)./1/p'
40
36
i need 40 and 36 saved into vars. is there anyway to add both them in vars for a bash script.
bash sensors
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Need some help i am trying to get sensors and add both answers to varible in a bash script.
i got this from here but doesnt quite help me with my needs.
[root@**** ~]# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +40.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 1: +45.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 2: +50.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 8: +47.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 9: +48.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 10: +45.0ðC (high = +80.0ðC, crit = +96.0ðC)
coretemp-isa-0001
Adapter: ISA adapter
Core 0: +36.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 1: +44.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 2: +41.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 8: +42.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 9: +44.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 10: +48.0ðC (high = +80.0ðC, crit = +96.0ðC)
[root@*** ~]# sensors | sed -rn 's/.Core 0:s+.([0-9]+)./1/p'
40
36
i need 40 and 36 saved into vars. is there anyway to add both them in vars for a bash script.
bash sensors
New contributor
Need some help i am trying to get sensors and add both answers to varible in a bash script.
i got this from here but doesnt quite help me with my needs.
[root@**** ~]# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +40.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 1: +45.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 2: +50.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 8: +47.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 9: +48.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 10: +45.0ðC (high = +80.0ðC, crit = +96.0ðC)
coretemp-isa-0001
Adapter: ISA adapter
Core 0: +36.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 1: +44.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 2: +41.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 8: +42.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 9: +44.0ðC (high = +80.0ðC, crit = +96.0ðC)
Core 10: +48.0ðC (high = +80.0ðC, crit = +96.0ðC)
[root@*** ~]# sensors | sed -rn 's/.Core 0:s+.([0-9]+)./1/p'
40
36
i need 40 and 36 saved into vars. is there anyway to add both them in vars for a bash script.
bash sensors
bash sensors
New contributor
New contributor
New contributor
asked 13 mins ago
Wayno
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Wayno is a new contributor. Be nice, and check out our Code of Conduct.
Wayno is a new contributor. Be nice, and check out our Code of Conduct.
Wayno is a new contributor. Be nice, and check out our Code of Conduct.
Wayno is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480039%2fsensors-and-saving-to-var%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password