Difference between revisions of "Bash"
Jump to navigation
Jump to search
↑ https://stackoverflow.com/questions/4419952/difference-between-return-and-exit-in-bash-functions
↑ https://apple.stackexchange.com/a/51038
↑ https://www.cyberciti.biz/faq/explain-brace-expansion-in-cp-mv-bash-shell-commands/
Tags: Mobile web edit, Mobile edit |
|||
(54 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | + | https://en.wikipedia.org/wiki/Bash_(Unix_shell) ([[1989]]) [[Unix shell]] | |
− | |||
− | * [[Bash | + | * macOS installation: <code>[[brew install bash]]</code> |
− | * [[alias]] | + | |
− | * <code>function { }</code> | + | |
− | * <code>[[&&]]</code> and <code>||</code> operator | + | * [[Bash history]] |
− | * <code>[[for]]</code> and <code>[[ | + | * [[Bash: alias|alias]] |
− | * <code>[[source]]</code> for [[includes]] | + | * <code>[[function]] { }</code> |
+ | * <code>[[&&]]</code> and <code>||</code> [[operator]] | ||
+ | * <code>#!</code> ([[shebang (Unix)]]) | ||
+ | * <code>[[for]]</code>, <code>[[while]]</code> and <code>[[until]]</code>. See also: [[Use loops in task (Ansible)]] | ||
+ | * <code>[[source]]</code> and <code>.</code> for [[includes]] | ||
* <code>[[set]]</code> | * <code>[[set]]</code> | ||
* [[Autocompletion]] | * [[Autocompletion]] | ||
− | * <code>/lib/lsb/init-functions</code> | + | * <code>[[/lib/lsb/]]init-functions</code> |
− | + | * <code>[[exit]]</code> , <code>[[return]]</code><ref>https://stackoverflow.com/questions/4419952/difference-between-return-and-exit-in-bash-functions</ref> and <code>$?</code> | |
− | * <code>[[exit]]</code> | + | * <code>[[.bashrc]]</code>, <code>[[.bash_profile]]</code><ref>https://apple.stackexchange.com/a/51038</ref> |
− | + | * Bash [[builtin]] functions: <code>[[complete]]</code>, <code>[[shift]]</code>, <code>[[disown]]</code> | |
− | + | * [[Brace expansion]]<ref>https://www.cyberciti.biz/faq/explain-brace-expansion-in-cp-mv-bash-shell-commands/</ref> | |
− | * <code>[[ | + | * [[Ctrl+z]] + [[bg]] |
− | * <code>[[ | + | * [[Variable]]: <code>[[PS1]]</code>, [[PATH]] |
+ | * Arrays https://kb.novaordis.com/index.php/Bash_Arrays | ||
+ | * <code>[[shopt]]</code> | ||
+ | * <code>[[trap]]</code> | ||
+ | * <code>[[eval]]</code> | ||
+ | * <code>[[dirname]]</code> | ||
+ | * [[Bash -c]] | ||
+ | * <code>bash --login</code> | ||
+ | == Activities == | ||
+ | # Read ''What is the difference between [[.bash_profile]] and [[.bashrc]]?'', https://apple.stackexchange.com/a/51038 | ||
+ | # Read https://j.ludost.net/blog/archives/2019/12/09/shell_wildcards_considered_dangerous/index.html | ||
+ | # Read https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html | ||
+ | == Related terms == | ||
+ | * <code>[[sed]], [[awk]]</code> | ||
+ | * [[variable]] | ||
+ | * [[readlink]] | ||
+ | * [[Windows Subsystem for Linux (WLS)]] | ||
+ | * [[fzf]] | ||
+ | * [[pushd]], [[popd]] | ||
+ | * [[space in Bash commands]] | ||
== See also == | == See also == | ||
* {{Bash}} | * {{Bash}} | ||
− | * {{ | + | * {{shells}} |
− | |||
− | |||
− | |||
− | |||
[[Category:Shells]] | [[Category:Shells]] | ||
+ | [[Category:Bash]] |
Latest revision as of 15:57, 18 February 2024
https://en.wikipedia.org/wiki/Bash_(Unix_shell) (1989) Unix shell
- macOS installation:
brew install bash
- Bash history
- alias
function { }
&&
and||
operator#!
(shebang (Unix))for
,while
anduntil
. See also: Use loops in task (Ansible)source
and.
for includesset
- Autocompletion
/lib/lsb/init-functions
exit
,return
[1] and$?
.bashrc
,.bash_profile
[2]- Bash builtin functions:
complete
,shift
,disown
- Brace expansion[3]
- Ctrl+z + bg
- Variable:
PS1
, PATH - Arrays https://kb.novaordis.com/index.php/Bash_Arrays
shopt
trap
eval
dirname
- Bash -c
bash --login
Activities[edit]
- Read What is the difference between .bash_profile and .bashrc?, https://apple.stackexchange.com/a/51038
- Read https://j.ludost.net/blog/archives/2019/12/09/shell_wildcards_considered_dangerous/index.html
- Read https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html
Related terms[edit]
See also[edit]
Bash [ -c ]
,alias
,&&
, Bash history, Autocompletion,set
,unset
,export
,.bash_aliases, .bashrc and .bash profile
,PS1
,echo
,brace expansion
, Function,shopt
,trap
,set -e
,source
,PATH
,complete
,disown
,.hushlogin
,.bashrc
,builtin
,eval
,set
,$PATH
,$HOME
,TZ
,.profile
,-e, -i
,Builtin (Bash)
,mapfile
,~
, return (Bash), for, until,declare, dirname, basename, functions.sh
, Bash arithmetic expansion,shift, bash --rcfile, readonly, $1, $@
- Shell: Fish shell,
sh
,Bash
,ksh
,zsh
,ash
, PowerShell (Windows),/usr/bin/env
,.hushlogin
,dash
,tcsh
, Shell redirection,dquote, $SHELL
, Google Cloud Shell, AWS CloudShell, explainshell.com, vmware_vm_shell, Nushell, Fig.io, direnv
Advertising: