Browsing Russian translation

491 of 547 results
491.
Parse option arguments.

Getopts is used by shell procedures to parse positional parameters
as options.

OPTSTRING contains the option letters to be recognized; if a letter
is followed by a colon, the option is expected to have an argument,
which should be separated from it by white space.

Each time it is invoked, getopts will place the next option in the
shell variable $name, initializing name if it does not exist, and
the index of the next argument to be processed into the shell
variable OPTIND. OPTIND is initialized to 1 each time the shell or
a shell script is invoked. When an option requires an argument,
getopts places that argument into the shell variable OPTARG.

getopts reports errors in one of two ways. If the first character
of OPTSTRING is a colon, getopts uses silent error reporting. In
this mode, no error messages are printed. If an invalid option is
seen, getopts places the option character found into OPTARG. If a
required argument is not found, getopts places a ':' into NAME and
sets OPTARG to the option character found. If getopts is not in
silent mode, and an invalid option is seen, getopts places '?' into
NAME and unsets OPTARG. If a required argument is not found, a '?'
is placed in NAME, OPTARG is unset, and a diagnostic message is
printed.

If the shell variable OPTERR has the value 0, getopts disables the
printing of error messages, even if the first character of
OPTSTRING is not a colon. OPTERR has the value 1 by default.

Getopts normally parses the positional parameters ($0 - $9), but if
more arguments are given, they are parsed instead.

Exit Status:
Returns success if an option is found; fails if the end of options is
encountered or an error occurs.
There are line breaks here. Each one represents a line break. Start a new line in the equivalent position in the translation.
There are leading/trailing spaces here. Each one represents a space character. Enter a space in the equivalent position in the translation.
Анализ аргументов параметра.

getopts используется процедурами командного процессора для анализа
позиционных параметров.

«строка_параметров» содержит буквы распознаваемых параметров. Если после
буквы идёт двоеточие, считается, что у параметра есть аргумент,
который должен быть отделён пробелом.

При каждом своём вызове getopts поместит следующий параметр в переменную
$имя, проинициализировав это имя, если оно не существует,
и проиндексирует следующий обрабатываемый аргумент в переменной
$OPTIND. Переменная $OPTIND инициализируется при каждом вызове
командного процессора или скрипта. Когда для параметра нужен аргумент,
getopts помещает этот аргумент в переменную $OPTARG.

getopts сообщает об ошибках двумя способами. Если первый символ
в «строке_параметров» является двоеточием, getopts включает режим молчания. В этом
режиме сообщения об ошибках не выводятся. Если указан неверный
параметр, getopts помещает символ параметра в переменную $OPTARG. Если
обязательный аргумент не найден, getopts помещает «:» в «имя»
и задаёт для $OPTARG символ найденного параметра. Если getopts не в режиме
молчания, и был указан неверный параметр, getopts помещает «?»
в НАЗВАНИЕ и удаляет переменную OPTARG. Если обязательный аргумент не найден, в НАЗВАНИЕ
помещается «?», переменная OPTARG удаляется и выводится диагностическое
сообщение.

Если переменная OPTERR имеет значение 0, getopts отключает
вывод сообщений об ошибках, даже если первый символ переменной
OPTSTRING не является двоеточием. По умолчанию переменная OPTERR имеет значение 1.

Getopts обычно анализирует позиционные параметры ($0–$9), но если
задано больше аргументов, анализируются последние.

Состояние выхода:
Возвращает успех, если найден параметр. Возвращает ошибку, если достигнут
конец параметров или возникла ошибка.
Translated by Pavel Maryanov
Located in builtins.c:646
491 of 547 results

This translation is managed by Russian Ubuntu Translators, assigned by Ubuntu Translators.

You are not logged in. Please log in to work on translations.