From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <4098B8E6.6000902@zaz.zp.ua> Date: Wed, 05 May 2004 12:50:30 +0300 From: Gennadiy Redko Organization: =?windows-1251?Q?=C7=C0=CE_=22=C7=C0=C7=22_=E3=2E_=C7?= =?windows-1251?Q?=E0=EF=EE=F0=EE=E6=FC=E5?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.4) Gecko/20030710 X-Accept-Language: ru-ru, en, uk, en-us MIME-Version: 1.0 To: community@altlinux.ru Subject: Re: [Comm] =?windows-1251?Q?=D6=E8=EA=EB_=E2_=EA=EE=EC=E0=ED?= =?windows-1251?Q?=E4=ED=EE=E9_=F1=F2=F0=EE=EA=E5=2E?= References: <20040505122804.2be2c70a.dov@media-link.info> In-Reply-To: <20040505122804.2be2c70a.dov@media-link.info> X-Enigmail-Version: 0.76.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.4 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2004 09:50:29 -0000 Archived-At: List-Archive: List-Post: Dolgov OV пишет: > Здравствуйте. > > Смейтесь, не смейтесь, но я уже голову сломал. Может вопрос и > примитивный, но для _не программиста_ вроде меня даже русский man bash > не помогает %-( > > Как в командной строке запустить цикл с присвоением переменной i > числового значения от 1 до 999, или скажем не до 999, а до первой > ошибки? > > надо что-то типа > for i=1 ; do "чего-то над $i" && i=i+1 ; done > > В общем выполнять цикл до тех пор, пока do чего-то (а конкретней wget) > не вернет ошибку. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Community mailing list > Community@altlinux.ru > http://lists.altlinux.ru/mailman/listinfo/community Я не большой знаток программирования на bash, но почему for а не while ? $ 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. .......................................................................................................... Это не то, что Вы хотели?