Главная страница


ru.unix.bsd

 
 - RU.UNIX.BSD ------------------------------------------------------------------
 From : Dmitry Pryanishnikov                 2:464/36       26 Jan 2007  11:32:15
 To : Andrey Ostanovsky
 Subject : Re: 6.2 and while
 -------------------------------------------------------------------------------- 
 
 
 Привет!
 
 On Fri, 26 Jan 2007, Andrey Ostanovsky wrote:
 
 > Кто использует в своих скриптах конструкцию while .; do ... ; done
 > имейте ввиду, что в 6.2 она перестала работать.
 
    А что она в принципе хорошего могла делать? Я вижу только такое
 использование точки в man 1 sh:
 
       . file  The commands in the specified file are read and executed by the
               shell.  If file contains any ``/'' characters, it is used as is.
               Otherwise, the shell searches the PATH for the file.  If it is
               not found in the PATH, it is sought in the current working direc-
               tory.
 
 > Вывернулся использованием while true; do ... - завтра посмотрим на результат.
 
    Вот вместо выворачивания полезнее таки документацию читать, тот же man 1 sh
 гласит:
 
     Built-in Commands
 
       :       A null command that returns a 0 (true) exit value.
 
 Так что
 
    while :; do
 
 всегда был и остается правильным вариантом для организации "вечного" цикла в 
 sh.
 
 > Вобщем, отломали очередную удобную рюшечку, как и в случае с ipfw sh.:(
 
    Блин, и где вы эти рюшечки находите? ;)
 
 > Andrey
 
 Sincerely, Dmitry
 -- 
 Atlantis ISP, System Administrator
 e-mail:  dmitry@atlantis.dp.ua
 nic-hdl: LYNX-RIPE
 --- ifmail v.2.14.os-p7
  * Origin: Atlantis ISP (2:464/36@fidonet)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 6.2 and while   Andrey Ostanovsky   26 Jan 2007 01:46:28 
 Re: 6.2 and while   Eugene Grosbein   26 Jan 2007 11:36:29 
 6.2 and while   Andrey Ostanovsky   26 Jan 2007 11:32:20 
 Re: 6.2 and while   Eugene Grosbein   26 Jan 2007 17:30:41 
 Re: 6.2 and while   Valentin Davydov   26 Jan 2007 10:31:08 
 Re: 6.2 and while   Vadim Goncharov   26 Jan 2007 18:49:28 
 Re: 6.2 and while   Dmitry Pryanishnikov   26 Jan 2007 11:32:15 
 6.2 and while   Andrey Ostanovsky   26 Jan 2007 14:33:54 
Архивное /ru.unix.bsd/245215d575673.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional