Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to compare percentage value in shell script

size=$(df -kh | awk '$6 == "/var" {print $5}')
size=${size%"%"}
if (( size < 80 )); then
    echo "/var is less than 80 % full"
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: Could not extract RVM sources 
Shell :: docker NoRouteToHostException: No route to host (Host unreachable) 
Shell :: linux repeat command every 5 minutes 
Shell :: pretty git branch graph print 
Shell :: how to install snapd on ubuntu 
Shell :: stack navigator 
Shell :: proxy shell 
Shell :: aws cli stop rds instance 
Shell :: install npm 
Shell :: material ui npm 
Shell :: get last 10 lines of log 
Shell :: git --version git version 2.7.0 (Apple Git-66) 
Shell :: docker loki 
Shell :: pull remote branch git 
Shell :: The CUDA compiler identification is unknown CMake Error at CMakeLists.txt:441 (enable_language): No CMAKE_CUDA_COMPILER could be found. 
Shell :: download clamav via terminal 
Shell :: branch conflicts 
Shell :: clear tracked files from git 
Shell :: revert changes to all files of a type git 
Shell :: how to install windows service using batch file 
Shell :: npm install --no-audit --save @testing-library/jest-dom@^5.14.1 @testing-library/react@^13.0.0 @testing-library/user-event@^13.2.1 web-vitals@^2.1.0` failed 
Shell :: email client for linux 
Shell :: git new branch create 
Shell :: conda install pdftotext 
Shell :: how to run powershell without admin rights 
Shell :: install wget on redhat 
Shell :: qbs linux 
Shell :: git view last commits 
Shell :: wc powershell 
Shell :: du command 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =