[Comm] Цикл в командной строке.
Dolgov OV
=?iso-8859-1?q?dov_=CE=C1_media-link=2Einfo?=
Ср Май 5 14:32:13 MSD 2004
On Wed, 05 May 2004 12:50:30 +0300
Gennadiy Redko <uit1 на zaz.zp.ua> wrote:
> > надо что-то типа
> > for i=1 ; do "чего-то над $i" && i=i+1 ; done
> >
> > В общем выполнять цикл до тех пор, пока do чего-то (а конкретней
> > wget) не вернет ошибку.
> >
> $ man bash
>
> .....................................................................
> ............................ while list; do list; done
> until list; do list; done
> The while command continuously executes the do list as
> long as
> the last command in list returns an exit status of
> zero. The
> until command is identical to the while command, except
>
> that the
> test is negated; the do list is executed as long as
>
> the last
> command in list returns a non-zero exit status. The
> exit
> status
> of the while and until commands is the exit status of
>
> the last
> do list command executed, or zero if none was executed.
> .....................................................................
> .....................................
>Это не то, что Вы хотели?
Это я читал, и даже на русском :-\
Меня интересует КАК заставить переменную $i принимать последовательно
значения 1,2,3 и т.д. Команду for я привел для примера, дабы попытаться
_на пальцАх_ изложить свою сумбурную мысль :-)
P.S. Как говаривал один мой знакомы программист, пытаясь ответить на
очередной мой вопрос: "Трудно понять логику непрофессионала..."
--
С наилучшими,
Олег Долгов
<dov AT media-link DOT info>
Registered Linux user #315454
Подробная информация о списке рассылки community