Answer the question
In order to leave comments, you need to log in
Getting time and dividing by two in a bash script how to implement?
I am writing one script and I don’t understand how, at the beginning of the actions it gives the initial time, for example, 17:00
after compilation, it will take about 40 minutes and at the end the script will check the time again and give out 17:40
And so that the script divides 1740 by two and gives the result. Thanks in advance
Answer the question
In order to leave comments, you need to log in
man date unix format
time=$(date +%s)
i = $(( ($finifh - $start)/2 ))
via
let let conec="($fin-$st)/2"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question