3
3
!!! warning "Attention"
4
4
Since Bash 4 has been around for quite some time now (4.3 will come soon), I consider it to be "standard".
5
5
This page is not maintained anymore and is left here to keep your links working.
6
- See the [ bashchanges] ( / scripting/bashchanges) page for new stuff introduced.
6
+ See the [ bashchanges] ( scripting/bashchanges.md ) page for new stuff introduced.
7
7
8
8
Besides many bugfixes since Bash 3.2, Bash 4 will bring some interesting
9
9
new features for shell users and scripters. See also
10
- [ bashchanges] ( / scripting/bashchanges) for a small general overview with
10
+ [ bashchanges] ( scripting/bashchanges.md ) for a small general overview with
11
11
more details.
12
12
13
13
Not all of the changes and news are included here, just the biggest or
@@ -34,7 +34,7 @@ files that represent the filedescriptors of the started process.
34
34
In other words: It lets you start a process in background and
35
35
communicate with its input and output data streams.
36
36
37
- See [ The coproc keyword] ( / syntax/keywords/coproc)
37
+ See [ The coproc keyword] ( syntax/keywords/coproc.md )
38
38
39
39
### The new "mapfile" builtin
40
40
@@ -43,7 +43,7 @@ an array. This avoids having to fill an array yourself using a loop. It
43
43
enables you to define the range of lines to read, and optionally call a
44
44
callback, for example to display a progress bar.
45
45
46
- See: [ mapfile] ( / commands/builtin/mapfile)
46
+ See: [ mapfile] ( commands/builtin/mapfile.md )
47
47
48
48
### Changes to the "case" keyword
49
49
@@ -55,7 +55,7 @@ list (rather than terminate the `case` construct).
55
55
The ` ;;& ` terminator causes the ` case ` construct to test the next given
56
56
pattern instead of terminating the whole execution.
57
57
58
- See [ case] ( / syntax/ccmd/case)
58
+ See [ case] ( syntax/ccmd/case.md )
59
59
60
60
### Changes to the "declare" builtin
61
61
@@ -86,7 +86,7 @@ A new option, `-i`, was introduced to be able to preload the input
86
86
buffer with some text (when Readline is used, with ` -e ` ). The user is
87
87
able to change the text, or press return to accept it.
88
88
89
- See [ read] ( / commands/builtin/read)
89
+ See [ read] ( commands/builtin/read.md )
90
90
91
91
### Changes to the "help" builtin
92
92
@@ -110,7 +110,7 @@ Besides the use of the 512 bytes blocksize everywhere in POSIX mode,
110
110
The brace expansion was tuned to provide expansion results with leading
111
111
zeros when requesting a row of numbers.
112
112
113
- See [ brace] ( / syntax/expansion/brace)
113
+ See [ brace] ( syntax/expansion/brace.md )
114
114
115
115
### Parameter Expansion
116
116
@@ -120,7 +120,7 @@ On expansion time you can modify the syntax by adding operators to the
120
120
parameter name.
121
121
122
122
See [ Case modification on parameter
123
- expansion] ( / syntax/pe#case_modification)
123
+ expansion] ( syntax/pe.md #case_modification )
124
124
125
125
### Substring expansion
126
126
@@ -143,7 +143,7 @@ current level.
143
143
The new shell option ` dirspell ` enables spelling corrections on
144
144
directory names during globbing.
145
145
146
- See [ globs] ( / syntax/expansion/globs)
146
+ See [ globs] ( syntax/expansion/globs.md )
147
147
148
148
## Associative Arrays
149
149
@@ -161,7 +161,7 @@ ASSOC[Hello]="second element"
161
161
ASSOC[Peter Pan]=" A weird guy"
162
162
```
163
163
164
- See [ arrays] ( / syntax/arrays)
164
+ See [ arrays] ( syntax/arrays.md )
165
165
166
166
## Redirection
167
167
@@ -172,17 +172,17 @@ good old `>>FILE 2>&1` notation.
172
172
The parser now understands ` |& ` as a synonym for ` 2>&1 | ` , which
173
173
redirects the standard error for a command through a pipe.
174
174
175
- See [ redirection] ( / syntax/redirection)
175
+ See [ redirection] ( syntax/redirection.md )
176
176
177
177
## Interesting new shell variables
178
178
179
179
| Variable | Description |
180
180
| -------------------------------------------------- | ------------------------------------------------------------------------------- |
181
- | [ BASHPID] ( / syntax/shellvars#BASHPID) | contains the PID of the current shell (this is different than what ` $$ ` does!) |
182
- | [ PROMPT_DIRTRIM] ( / syntax/shellvars#PROMPT_DIRTRIM) | specifies the max. level of unshortened pathname elements in the prompt |
183
- | [ FUNCNEST] ( / syntax/shellvars#FUNCNEST) | control the maximum number of shell function recursions |
181
+ | [ BASHPID] ( syntax/shellvars.md #BASHPID ) | contains the PID of the current shell (this is different than what ` $$ ` does!) |
182
+ | [ PROMPT_DIRTRIM] ( syntax/shellvars.md #PROMPT_DIRTRIM ) | specifies the max. level of unshortened pathname elements in the prompt |
183
+ | [ FUNCNEST] ( syntax/shellvars.md #FUNCNEST ) | control the maximum number of shell function recursions |
184
184
185
- See [ shellvars] ( / syntax/shellvars)
185
+ See [ shellvars] ( syntax/shellvars.md )
186
186
187
187
## Interesting new Shell Options
188
188
@@ -197,7 +197,7 @@ mentioned.
197
197
| ` globstar ` | enables recursive globbing with ` ** ` |
198
198
| ` lastpipe ` | (4.2) to execute the last command in a pipeline in the current environment |
199
199
200
- See [ shell_options] ( / internals/shell_options)
200
+ See [ shell_options] ( internals/shell_options.md )
201
201
202
202
## Misc
203
203
@@ -210,7 +210,7 @@ See [shell_options](/internals/shell_options)
210
210
- The output target for the ` xtrace ` (` set -x ` /` set +x ` ) feature is
211
211
configurable ** since Bash 4.1** (previously, it was fixed to
212
212
` stderr ` ): a variable named
213
- [ BASH_XTRACEFD] ( / syntax/shellvars#BASH_XTRACEFD) can be set to the
213
+ [ BASH_XTRACEFD] ( syntax/shellvars.md #BASH_XTRACEFD ) can be set to the
214
214
filedescriptor that should get the output
215
215
- Bash 4.1 is able to log the history to syslog (only to be enabled at
216
216
compile time in ` config-top.h ` )
0 commit comments