Category: BASH Shell
The inbuilt BASH does not support floating point arithmetic calculations but we can easily declare a function to do so via AWK. #!/bin/bash # calc.sh function calc() { awk …
If you connect to a SSH – when the window is closed, all running programs in the current session will be terminated. One way to solve this is to …
I have quite a few servers, and deploying same files/folders to them is a problem. Then I come up with the following BASH script where I can just run …
April 24, 2021
awk, AWK, AWK programming, BASH, bash script, BASH Shell, batch script, linux, Shell Scripts, ubuntu
Disk high usage are one of the common cause of server down. Some administrators would create a 8GB empty file, and once the disk usage is exceeding a threshold, …
We can write a BASH Script to print out the current CPU frequency and temperature on Raspberry PI. #pi@raspberrypi:~ $ cat ./cpu_freq.sh #!/bin/bash temp=`head -n 1 /sys/class/thermal/thermal_zone0/temp | xargs …