P
P
Pulshen2015-06-07 17:02:19
linux
Pulshen, 2015-06-07 17:02:19

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

1 answer(s)
M
microphone, 2015-06-07
@Pulshen

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 question

Ask a Question

731 491 924 answers to any question