If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:getopts (bashcmd)

From BoxMatrix


BoxMatrix >> Shell-Commands >> getopts (bashcmd) @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

Startup-Scr Hotplug-Scr BusyBox-Cmds Bash-Cmds AVM-Cmds Chipset-Cmds Linux-Cmds Shared-Libs Kernel-Mods Research

Info
  
Name-Collision - multiple objects in this wiki use the name getopts!
getopts (bashcmd) Parse option arguments.
getopts (bbcmd) Parse commandline options.

Bash-Command

Goto:   GPL-Browser  -  Dependencies   -   Model-Matrix   -   Symbols   -   SMW-Browser

Details

Excerpt from:   Bash source   >>   getopts command

Possible #if / #endif blocks are compile options. There is no mechanism yet on BoxMatrix to detect which of these are set per model.

getopts optstring name [arg]

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.

Excerpt from:   bashref.info   >>   Bourne Shell Builtins   >>   getopts command

getopts OPTSTRING NAME [ARGS]

'getopts' is used by shell scripts to parse positional parameters.
OPTSTRING contains the option characters to be recognized; if a
character is followed by a colon, the option is expected to have an
argument, which should be separated from it by whitespace.  The
colon (':') and question mark ('?') may not be used as option
characters.  Each time it is invoked, 'getopts' places 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
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 variable
'OPTARG'.  The shell does not reset 'OPTIND' automatically; it must
be manually reset between multiple calls to 'getopts' within the
same shell invocation if a new set of parameters is to be used.

When the end of options is encountered, 'getopts' exits with a
return value greater than zero.  'OPTIND' is set to the index of
the first non-option argument, and NAME is set to '?'.

'getopts' normally parses the positional parameters, but if more
arguments are given in ARGS, 'getopts' parses those instead.

'getopts' can report errors in two ways.  If the first character of
OPTSTRING is a colon, SILENT error reporting is used.  In normal
operation, diagnostic messages are printed when invalid options or
missing option arguments are encountered.  If the variable 'OPTERR'
is set to 0, no error messages will be displayed, even if the first
character of 'optstring' is not a colon.

If an invalid option is seen, 'getopts' places '?' into NAME and,
if not silent, prints an error message and unsets 'OPTARG'.  If
'getopts' is silent, the option character found is placed in
'OPTARG' and no diagnostic message is printed.

If a required argument is not found, and 'getopts' is not silent, a
question mark ('?') is placed in NAME, 'OPTARG' is unset, and a
diagnostic message is printed.  If 'getopts' is silent, then a
colon (':') is placed in NAME and 'OPTARG' is set to the option
character found.

GPL-Browser

Daily updated index of all getopts code findings on the GPL-Browser. Last update: 2024-03-29 05:14 GMT.
The Browse column points to the Path containing the respective source code on the gpl.boxmatrix.info service.
The SoC column lists the Chip-Codenames, the Model column lists the nicks of the Box-Models.
The Diff column links the comparison of the AVM Kernel to the pristine original from Kernel.org.
The Download column links the full tarball the respective directory content is extracted from.
The presence of the source does not mean it fits the respective model and architecture. See the Model-Matrix where it's used.

Dependencies

Daily updated index of all dependencies of this command. Last update: 2024-03-28 07:36 GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.

Relation Typ Object Mod Firmware Info Origin
0 dependencies for this command

Model-Matrix

Daily updated index of the presence, path and size of this command for each model. Last update: 2024-03-28 15:46 GMT.
Showing all models using this command. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom) label in the Model column shows which CPU is meant for models with multiple Linux instances.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size
FRITZ!Box 4020 7.39 <bash>
FRITZ!Box 4040 7.39 <bash>
FRITZ!Box 4060 7.39 <bash>
FRITZ!Box 5530 Fiber (main) 7.39 <bash>
FRITZ!Box 5590 Fiber (arm) 7.39 <bash>
FRITZ!Box 6430 Cable (arm) 7.57 <bash>
FRITZ!Box 6490 Cable (arm) 7.39 - 7.57 <bash>
FRITZ!Box 6590 Cable (arm) 7.39 - 7.57 <bash>
FRITZ!Box 6591 Cable (arm) 7.04 - 7.57 <bash>
FRITZ!Box 6591 Cable (atom) 7.04 - 7.57 <bash>
FRITZ!Box 6660 Cable (arm) 7.14 - 7.57 <bash>
FRITZ!Box 6660 Cable (atom) 7.14 - 7.57 <bash>
FRITZ!Box 6670 Cable (arm) 7.57 - 7.61 <bash>
FRITZ!Box 6670 Cable (atom) 7.61 <bash>
FRITZ!Box 6690 Cable (arm) 7.28 - 7.57 <bash>
FRITZ!Box 6690 Cable (atom) 7.28 - 7.57 <bash>
FRITZ!Box 6820 LTE v1 7.39 <bash>
FRITZ!Box 6820 LTE v2 7.39 <bash>
FRITZ!Box 6840 LTE 7.39 <bash>
FRITZ!Box 6850 LTE 7.39 <bash>
FRITZ!Box 6850 5G 7.39 <bash>
FRITZ!Box 6890 LTE 7.39 <bash>
FRITZ!Box 6890 LTE v1 7.39 <bash>
FRITZ!Box 6890 LTE v2 7.39 <bash>
FRITZ!Box 7272 7.39 <bash>
FRITZ!Box 7430 7.39 <bash>
FRITZ!Box 7490 (main) 7.39 - 7.57 <bash>
FRITZ!Box 7520 7.39 <bash>
FRITZ!Box 7520 v2 (arm) 7.39 <bash>
FRITZ!Box 7530 7.39 <bash>
FRITZ!Box 7530 AX 7.39 <bash>
FRITZ!Box 7560 7.39 <bash>
FRITZ!Box 7590 7.39 <bash>
FRITZ!Box 7590 AX 7.39 <bash>
FRITZ!Repeater 600 7.39 <bash>
FRITZ!Repeater 1200 7.39 <bash>
FRITZ!WLAN Repeater 1750E 7.39 <bash>
FRITZ!Repeater 2400 7.39 <bash>
FRITZ!Repeater 3000 7.39 <bash>
FRITZ!Repeater 3000 AX 7.39 <bash>
FRITZ!Powerline 1260E 7.39 <bash>
41 models use this command

Symbols

Daily updated index of all symbols of this command. Last update: 2024-03-28 07:36 GMT.

Firmware Symbol
0 symbols for this command

SMW-Browser

Information is currently being retrieved from the backend.