[an error occurred while processing this directive]

Цикл с счетчиком итераций на Shell
min_num=2
max_num=10
i=$min_num
while [ $i -le $max_num ]; do
        echo "$i"
        i=$[i+1] # в зависимости от shell также подходит i=$(($i + 1)) или i=`expr $i + 1`
done
 
19.01.2003
Ключи: shell, loop / Лицензия: CC-BY
Раздел:    Корень / Программисту и web-разработчику / Shell / Готовые скрипты

[an error occurred while processing this directive]

[an error occurred while processing this directive]