Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be376ef

Browse files
authored
Merge pull request ruanyf#1 from ruanyf/master
Merge Master
2 parents 0010e5b + 31cab07 commit be376ef

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ A collection of simple Bash scripts.
3838
1. [CollectNetworkInfo.sh](scripts/collectnetworkinfo.sh): gather information related to server
3939
1. [RemoteBackup.sh](scripts/remotebackup.sh): backup a local file into a remote server
4040
1. [HardwareInfo.sh](scripts/hardware_machine.sh): show hardware information for systems Linux
41+
1. [Get-Temperature.sh](scripts/get-temperature.sh): show CPU temperature
4142

4243
## Math
4344

scripts/affect.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
arr=('-' '|' '/' '-' '\' '|')
3+
arr=('-' '\' '|' '/')
44
while true; do
55
for c in "${arr[@]}"; do
66
printf "\r %c " $c

scripts/get-temperature.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
TEMP_FILE=/sys/class/thermal/thermal_zone0/temp
4+
5+
ORIGINAL_TEMP=$(cat $TEMP_FILE)
6+
TEMP_C=$((ORIGINAL_TEMP/1000))
7+
TEMP_F=$(($TEMP_C * 9/5 + 32))
8+
9+
echo $TEMP_F F
10+

0 commit comments

Comments
 (0)