Browsing Brazilian Portuguese translation

525 of 581 results
525.
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.
Analisa argumentos de opções.

Getopts é usado pelos procedimentos do shell para analisar parâmetros
posicionais como opções.

OPÇÕES é uma string que contém as letras de opções a ser reconhecidas;
se uma letra é seguida por dois-pontos, é esperado que a opção tenha
um argumento, o que deveria ser separado dela por um espaço em branco.

A cada vez que ele é chamado, getopts coloca a próxima opção
na variável shell $NOME, inicializando NOME se ela não existir,
e o índice do próximo argumento a ser processado para dentro da
variável OPTIND. OPTIND é inicializado para 1 a cada vez que o
shell ou um script shell é chamado. Quando uma opção requer
um argumento, getopts coloca aquele argumento em uma variável
shell chamada OPTARG.

getopts relata erros em um de duas formas. Se o primeiro caractere
de OPÇÕES for caractere dois-pontos, getopts usa sistema silencioso de
relatório de erro. Neste modo, nenhuma mensagem de erro é mostrada.
Se uma opção inválida é vista, getopts coloca o caractere de opção
encontrada dentro do OPTARG. Se um argumento obrigatório não for
encontrado, getopts coloca um ':' em NOME e define OPTARG para o
caractere de opção encontrada. Se getopts não estiver no modo
silencioso, uma opção inválida é vista, getopts coloca um '?' em
NOME e remove definição de OPTARG. Se um argumento obrigatório não for
encontrado, um '?' é colocado em NOME, OPTARG tem sua definição removida
e uma mensagem de diagnóstico é mostrada.

Se a variável shell OPTERR possuir o valor 0, getopts desabilita a
exibição de mensagens de erro, mesmo se o primeiro caractere de
OPÇÕES não for dois-pontos. OPTERR tem o valor por padrão.

Getopts normalmente analisa os parâmetros posicionais ($0 - $9), mas se
mais argumentos forem fornecidos, eles serão analisados.

Status de saída:
Retorna sucesso, se uma opção for encontrada; falha se o fim das opções
for encontrado ou ocorrer um erro.
Translated by Rafael Fontenelle
help getopts
Located in builtins.c:646
525 of 581 results

This translation is managed by Ubuntu Brazilian Portuguese Translators, assigned by Ubuntu Translators.

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