add ${PIPESTATUS[c]} special var (#1800)
Co-authored-by: Rico Sta. Cruz <rstacruz@users.noreply.github.com>
This commit is contained in:
parent
d62209edf3
commit
e02473bcb5
15
bash.md
15
bash.md
|
@ -778,13 +778,14 @@ read -n 1 ans # Just one character
|
||||||
|
|
||||||
### Special variables
|
### Special variables
|
||||||
|
|
||||||
| Expression | Description |
|
| Expression | Description |
|
||||||
| ---------- | -------------------------------------- |
|
| ------------------ | -------------------------------------- |
|
||||||
| `$?` | Exit status of last task |
|
| `$?` | Exit status of last task |
|
||||||
| `$!` | PID of last background task |
|
| `$!` | PID of last background task |
|
||||||
| `$$` | PID of shell |
|
| `$$` | PID of shell |
|
||||||
| `$0` | Filename of the shell script |
|
| `$0` | Filename of the shell script |
|
||||||
| `$_` | Last argument of the previous command |
|
| `$_` | Last argument of the previous command |
|
||||||
|
| `${PIPESTATUS[n]}` | return value of piped commands (array) |
|
||||||
|
|
||||||
See [Special parameters](http://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables).
|
See [Special parameters](http://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue