Browsing German translation

504 of 560 results
504.
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.
Analysieren von Optionsargumenten.

Getopts wird von Shell-Prozeduren verwendet, um die
Kommandozeilenoptionen auszuwerten.

"Optionen" enthält die auszuwertenden Buchstaben. Ein Doppelpunkt
nach dem Buchstaben zeigt an, dass ein Argument erwartet wird,
welches durch ein Leerzeichen von der Option getrennt ist.

Bei jedem Aufruf von »getopts« wird die nächste Option der
$Variable zugewiesen. Diese wird angelegt, falls sie noch
nicht existiert. Weiterhin wird der Indes Index des nächsten zu
verarbeitenden Arguments der Shell-Variablen OPTIND
zugewiesen. OPTIND wird bei jedem Aufruf einer Shell oder eines
Shell-Skripts mit 1 initialisiert. Wenn eine Option ein Argument
benötigt, wird dieses OPTARG zugewiesen.

Für Fehlermeldungen gibt es zwei Varianten. Wenn das erste
Zeichen des Optionsstrings ein Doppelpunkt ist, wird der stille
Fehlermodus von »getopts« verwendet. In diesem Modus wird keine
Fehlermeldung ausgegeben. Wenn eine ungültige Option erkannt wird,
wird das gefundene Optionenzeichen OPTARG zugewiesen. Wenn ein
benötigtes Argument fehlt, wird ein »:« der Variable zugewiesen
und OPTARG auf das gefundene Optionenzeichen gesetzt. Im anderen
Fehlermodus wird ein »?« der Variable zugewiesen, OPTARG geleert
und eine Fehlermeldung ausgegeben.

Wenn die Shell-Variable OPTERR den Wert »0« hat, werden durch getopts
keine Fehlermeldungen ausgegeben, auch wenn das erste Zeichen
von OPTSTRING kein Doppelpunkt ist. OPTERR hat den Vorgabewert »1«.

Getopts analysiert normalerweise die von der Position abhängigen
Parameter ($0 - $9). Aber wenn mehr Argumente angegeben sind,
werden stattdessen diese analysiert.

Rückgabewert:
Gibt »Erfolg« zurück wenn eine Option gefunden wird und
»gescheitert«, wenn das Ende der Optionen erreicht oder ein Fehler
aufgetreten ist.
Translated by Nils Naumann
getopts
Located in builtins.c:646
504 of 560 results

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

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