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

Re: [OT] Shell escript



On Sun, Sep 13, 2015, at 17:07, Sergio Durigan Junior wrote:
> On Sunday, September 13 2015, Samir Patrice wrote:
> > representada como 00, 01, 02... até 23 sempre com dois dígitos logo o laço
> > incremental pra mim não funcionou.
> > Alguém pode me dar um palpite de como resolver? Ou mostrar o caminho das
> > pedras para eu pesquisar como resolver isso.
> 
> Você pode usar o printf:
> 
> #> printf '%02d\n' 1
> 01

ou o seq mesmo:
for i in $(seq -w 0 23) ; do echo $i; done

Dá uma olhada no lftp (instale o pacote lftp, e leia a manpage dele).

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique de Moraes Holschuh <hmh@debian.org>


Reply to: