Hi Again,
Please help to get below out put. DOWNTIME=`date +%s` UPTIME =`date +%s` I want to take output of ($UPTIME - $DOWNTIME) in minutes and seconds.. Eg : Total downtime was 20 minutes and 10 seconds |
Lets say I have below two variables.
Code:
Eg: "Total downtime was 2 minutes and 5 seconds" Please help me... |
Quote:
Here is a variant of your script set to do the first part of the calculation to get seconds, in preparation for then calculating the minutes. Code:
#!/bin/sh |
Hello Turbocapitalist,
Yeah.. I got it. Minutes=$(( $downtime / 60 )); Thanks a lot for your support. and for everyone who have supported me out... |
All times are GMT -5. The time now is 10:25 PM. |