shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Converção de segundos


From: João André Simioni
Subject: Re: [shell-script] Converção de segundos
Date: Mon, 14 Apr 2008 16:34:36 -0300

#!/bin/bash

SEC=$1

MIN=$(($SEC/60))
SEC=$(($SEC-$MIN*60))
HOR=$(($MIN/60))
MIN=$(($MIN-$HOR*60))

echo "$HOR:$MIN:$SEC"

2008/4/14 gleissonmb <address@hidden>:
>
>
>
>
>
>
> Pessoal,
>
> Como faço para converter segundos no formato horas:minutos:segundos?
>
> ex:
>
> Converter 7800 segundos em:
>
> 02 horas, 10 minutos e 00 segundos.
>
> 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]