You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`[-+]a` make NAMEs indexed arrays (removing with `+a` is valid syntax, but leads to an error message)
37
-
38
-
`[-+]A` make NAMEs associative arrays
39
-
40
-
`[-+]c`**Undocumented** convert NAMEs to "capcase" on assignment (makes the first letter upper-case and the rest lower). Requires Bash built with `-DCASEMOD_CAPCASE`
41
-
42
-
`-f` restrict action or display to function names and definitions (removing with `+f` is valid syntax, but leads to an error message)
43
-
44
-
`-F` restrict display to function names only (plus line number and source file when debugging)
45
-
46
-
`-g` create global variables when used in a shell function; otherwise ignored (by default, `declare` declares local scope variables when used in shell functions)
47
-
48
-
`[-+]i` make NAMEs have the "integer" attribute
49
-
50
-
`[-+]l` convert NAMEs to lower case on assignment (makes sure the variable contains only lower case letters)
51
-
52
-
`[-+]n` make NAME a reference to the variable named by its value. Introduced in Bash 4.3-alpha.
53
-
''`${!NAME}`'' reveals the reference variable name, VALUE.
54
-
Use `unset -n NAME` to unset the variable. (`unset -v NAME` unsets the VALUE variable.)
55
-
Use `[[ -R NAME ]]` to test if NAME has been set to a VALUE, another variable's name.
56
-
57
-
`-p` display the attributes and value of each NAME
58
-
59
-
`[-+]r` make NAMEs readonly (removing with `+r` is valid syntax, but not possible)
60
-
61
-
`[-+]t` make NAMEs have the "trace" attribute (effective only for functions)
62
-
63
-
`[-+]u` convert NAMEs to upper case on assignment (makes sure the variable contains only upper case letters)
|`[-+]a`|make NAMEs indexed arrays (removing with `+a` is valid syntax, but leads to an error message)|
36
+
|`[-+]A`|make NAMEs associative arrays|
37
+
|`[-+]c`|**Undocumented** convert NAMEs to "capcase" on assignment (makes the first letter upper-case and the rest lower). Requires Bash built with `-DCASEMOD_CAPCASE`|
38
+
|`-f`|restrict action or display to function names and definitions (removing with `+f` is valid syntax, but leads to an error message)|
39
+
|`-F`|restrict display to function names only (plus line number and source file when debugging)|
40
+
|`-g`|create global variables when used in a shell function; otherwise ignored (by default, `declare` declares local scope variables when used in shell functions)|
41
+
|`[-+]i`|make NAMEs have the "integer" attribute|
42
+
|`[-+]l`|convert NAMEs to lower case on assignment (makes sure the variable contains only lower case letters)|
43
+
|`[-+]n`|make NAME a reference to the variable named by its value. Introduced in Bash 4.3-alpha. ''`${!NAME}`'' reveals the reference variable name, VALUE. Use `unset -n NAME` to unset the variable. (`unset -v NAME` unsets the VALUE variable.) Use `[[ -R NAME ]]` to test if NAME has been set to a VALUE, another variable's name.|
44
+
|`-p`|display the attributes and value of each NAME|
45
+
|`[-+]r`|make NAMEs readonly (removing with `+r` is valid syntax, but not possible)|
46
+
|`[-+]t`|make NAMEs have the "trace" attribute (effective only for functions)|
47
+
|`[-+]u`|convert NAMEs to upper case on assignment (makes sure the variable contains only upper case letters)|
`-l [SIGNAL...]`Lists supported/known signal numbers and their symbolic name. If `SIGNAL` is given, only list this signal, translated (if a number is given the symbolic name is printed, and vice versa)
41
-
`-L [SIGNAL...]`Same as `-l [SIGNAL]` (compatiblity option)
35
+
|Option|Description|
36
+
|------|-----------|
37
+
|`-s SIGNAL`|specifies the signal to send|
38
+
|`-n SIGNALNUMBER`|specifies the signal to send|
39
+
|`-SIGNAL`|specifies the signal to send|
40
+
|`-l [SIGNAL...]`|Lists supported/known signal numbers and their symbolic name. If `SIGNAL` is given, only list this signal, translated (if a number is given the symbolic name is printed, and vice versa)|
41
+
|`-L [SIGNAL...]`|Same as `-l [SIGNAL]` (compatiblity option)|
`-c QUANTUM`Specifies the number of lines that have to be read between every call to the callback specified with `-C`. The default QUANTUM is 5000
25
-
`-C CALLBACK`Specifies a callback. The string `CALLBACK` can be any shell code, the index of the array that will be assigned, and the line is appended at evaluation time.
26
-
`-n COUNT`Reads at most `COUNT` lines, then terminates. If `COUNT` is 0, then all lines are read (default).
27
-
`-O ORIGIN`Starts populating the given array `ARRAY` at the index `ORIGIN` rather than clearing it and starting at index 0.
28
-
`-s COUNT`Discards the first `COUNT` lines read.
29
-
`-t`Remove any trailing newline from a line read, before it is assigned to an array element.
30
-
`-u FD`Read from filedescriptor `FD` rather than standard input.
22
+
|Option|Description|
23
+
|------|-----------|
24
+
|`-c QUANTUM`|Specifies the number of lines that have to be read between every call to the callback specified with `-C`. The default QUANTUM is 5000|
25
+
|`-C CALLBACK`|Specifies a callback. The string `CALLBACK` can be any shell code, the index of the array that will be assigned, and the line is appended at evaluation time.|
26
+
|`-n COUNT`|Reads at most `COUNT` lines, then terminates. If `COUNT` is 0, then all lines are read (default).|
27
+
|`-O ORIGIN`|Starts populating the given array `ARRAY` at the index `ORIGIN` rather than clearing it and starting at index 0.|
28
+
|`-s COUNT`|Discards the first `COUNT` lines read.|
29
+
|`-t`|Remove any trailing newline from a line read, before it is assigned to an array element.|
30
+
|`-u FD`|Read from filedescriptor `FD` rather than standard input.|
31
31
32
32
While `mapfile` isn't a common or portable shell feature, it's
33
33
functionality will be familiar to many programmers. Almost all
0 commit comments