Книга: Linux Network Administrator Guide, Second Edition

The if and goto commands

The if and goto commands

The if command is a conditional branch, rather than a full-featured programming if statement. Its syntax is:

if var op number goto label

The expression must be a simple comparison between one of the variables $errlvl, $locip, and $rmtip. var must be an integer number; the operator op may be one of -,!=, ‹, ›, ‹=, and ›=.

The goto command makes the execution of the script continue at the line following that bearing the label. A label must be the first word on the line and must be followed immediately by a colon.

Оглавление книги


Генерация: 4.440. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз