bash: Recover broken links using Web Archive (#2004)

This commit is contained in:
Habetdin 2023-06-02 13:01:51 +03:00 committed by GitHub
parent 748c2a65b5
commit 62e5f5f5ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

16
bash.md
View File

@ -25,7 +25,7 @@ This is a quick reference to getting started with Bash scripting.
- [Learn bash in y minutes](https://learnxinyminutes.com/docs/bash/) _(learnxinyminutes.com)_ - [Learn bash in y minutes](https://learnxinyminutes.com/docs/bash/) _(learnxinyminutes.com)_
- [Bash Guide](http://mywiki.wooledge.org/BashGuide) _(mywiki.wooledge.org)_ - [Bash Guide](http://mywiki.wooledge.org/BashGuide) _(mywiki.wooledge.org)_
- [Bash Hackers Wiki](https://wiki.bash-hackers.org) _(wiki.bash-hackers.org)_ - [Bash Hackers Wiki](https://web.archive.org/web/20230406205817/https://wiki.bash-hackers.org/) _(wiki.bash-hackers.org)_
### Example ### Example
@ -68,7 +68,7 @@ echo "I'm in `pwd`" # obsolescent
# Same # Same
``` ```
See [Command substitution](http://wiki.bash-hackers.org/syntax/expansion/cmdsubst) See [Command substitution](https://web.archive.org/web/20230326081741/https://wiki.bash-hackers.org/syntax/expansion/cmdsubst)
### Conditional execution ### Conditional execution
@ -124,7 +124,7 @@ echo {A,B}.js
| `{A,B}.js` | Same as `A.js B.js` | | `{A,B}.js` | Same as `A.js B.js` |
| `{1..5}` | Same as `1 2 3 4 5` | | `{1..5}` | Same as `1 2 3 4 5` |
See: [Brace expansion](http://wiki.bash-hackers.org/syntax/expansion/brace) See: [Brace expansion](https://web.archive.org/web/20230207192110/https://wiki.bash-hackers.org/syntax/expansion/brace)
Parameter expansions Parameter expansions
@ -150,7 +150,7 @@ length=2
echo "${name:0:length}" #=> "Jo" echo "${name:0:length}" #=> "Jo"
``` ```
See: [Parameter expansion](http://wiki.bash-hackers.org/syntax/pe) See: [Parameter expansion](https://web.archive.org/web/20230408142504/https://wiki.bash-hackers.org/syntax/pe)
```bash ```bash
str="/path/to/foo.cpp" str="/path/to/foo.cpp"
@ -364,7 +364,7 @@ fi
**Note**: `$@` and `$*` must be quoted in order to perform as described. **Note**: `$@` and `$*` must be quoted in order to perform as described.
Otherwise, they do exactly the same thing (arguments as separate strings). Otherwise, they do exactly the same thing (arguments as separate strings).
See [Special parameters](http://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables). See [Special parameters](https://web.archive.org/web/20230318164746/https://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables).
Conditionals Conditionals
------------ ------------
@ -809,7 +809,7 @@ read -n 1 ans # Just one character
| `$_` | Last argument of the previous command | | `$_` | Last argument of the previous command |
| `${PIPESTATUS[n]}` | return value of piped commands (array) | | `${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](https://web.archive.org/web/20230318164746/https://wiki.bash-hackers.org/syntax/shellvars#special_parameters_and_shell_variables).
### Go to previous directory ### Go to previous directory
@ -840,8 +840,8 @@ fi
## Also see ## Also see
{: .-one-column} {: .-one-column}
* [Bash-hackers wiki](http://wiki.bash-hackers.org/) _(bash-hackers.org)_ * [Bash-hackers wiki](https://web.archive.org/web/20230406205817/https://wiki.bash-hackers.org/) _(bash-hackers.org)_
* [Shell vars](http://wiki.bash-hackers.org/syntax/shellvars) _(bash-hackers.org)_ * [Shell vars](https://web.archive.org/web/20230318164746/https://wiki.bash-hackers.org/syntax/shellvars) _(bash-hackers.org)_
* [Learn bash in y minutes](https://learnxinyminutes.com/docs/bash/) _(learnxinyminutes.com)_ * [Learn bash in y minutes](https://learnxinyminutes.com/docs/bash/) _(learnxinyminutes.com)_
* [Bash Guide](http://mywiki.wooledge.org/BashGuide) _(mywiki.wooledge.org)_ * [Bash Guide](http://mywiki.wooledge.org/BashGuide) _(mywiki.wooledge.org)_
* [ShellCheck](https://www.shellcheck.net/) _(shellcheck.net)_ * [ShellCheck](https://www.shellcheck.net/) _(shellcheck.net)_