I want to check the number of processess running and if this number of process is between 0-20 then print the number of process, if between 20-40 issue a warning and if between 40-70 issue a critical warning.
This code is being written to check the number of icinga processes.
This is the code I have so far to count the number of processes :
ps -ef | grep icinga | wc -l
From here on I do not understand how to give the above condition with a nested if else condition.