We are still actively working on the spam issue.
Difference between revisions of "Bash"
m (made bash more general + fixup) |
|||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | Bash can be personalized to be fun, useful, or to look ''cool''. | + | Bash (Bourne-again Shell) is a command-line shell/programming language by the GNU Project. Its name alludes to its predecessor, the long-deprecated Bourne shell. Bash can be run on most UNIX-like operating systems, including GNU/Linux. |
+ | |||
+ | == Configuration == | ||
+ | |||
+ | Bash can be personalized to be fun, useful, or to look ''cool''. | ||
Remember to add a short description of what each entry does, and possibly why it would be useful. | Remember to add a short description of what each entry does, and possibly why it would be useful. | ||
− | ==Options== | + | ===Options=== |
− | < | + | <pre> |
# Changing directory without typing 'cd'. Typing a '/' at the end solves ambiguity. | # Changing directory without typing 'cd'. Typing a '/' at the end solves ambiguity. | ||
shopt -s autocd | shopt -s autocd | ||
− | </ | + | </pre> |
− | < | + | <pre> |
# Enable globbing hidden/dot files (.filename). | # Enable globbing hidden/dot files (.filename). | ||
shopt -s dotglob | shopt -s dotglob | ||
− | </ | + | </pre> |
− | < | + | <pre> |
# Enable recursive (**) globbing. | # Enable recursive (**) globbing. | ||
shopt -s globstar | shopt -s globstar | ||
− | </ | + | </pre> |
− | ==Aliases== | + | ===Aliases=== |
− | < | + | <pre> |
alias please='sudo' | alias please='sudo' | ||
alias fuck='sudo !!' | alias fuck='sudo !!' | ||
Line 64: | Line 68: | ||
echo "${1}" | bc -l; | echo "${1}" | bc -l; | ||
} | } | ||
− | </ | + | </pre> |
− | ==Other== | + | ===Other=== |
− | < | + | <pre> |
#Set PATH so it includes user's private bin if it exists | #Set PATH so it includes user's private bin if it exists | ||
if [ -d "$HOME/bin" ] ; then | if [ -d "$HOME/bin" ] ; then | ||
PATH="$HOME/bin:$PATH" | PATH="$HOME/bin:$PATH" | ||
fi | fi | ||
− | </ | + | </pre> |
[[Category:Ricing]] | [[Category:Ricing]] | ||
Line 78: | Line 82: | ||
[[Category:Productivity]] | [[Category:Productivity]] | ||
[[Category:HowTo]] | [[Category:HowTo]] | ||
+ | [[Category:GNU/Linux]] |
Latest revision as of 04:23, 14 March 2020
Bash (Bourne-again Shell) is a command-line shell/programming language by the GNU Project. Its name alludes to its predecessor, the long-deprecated Bourne shell. Bash can be run on most UNIX-like operating systems, including GNU/Linux.
Contents
Configuration
Bash can be personalized to be fun, useful, or to look cool. Remember to add a short description of what each entry does, and possibly why it would be useful.
Options
# Changing directory without typing 'cd'. Typing a '/' at the end solves ambiguity. shopt -s autocd
# Enable globbing hidden/dot files (.filename). shopt -s dotglob
# Enable recursive (**) globbing. shopt -s globstar
Aliases
alias please='sudo' alias fuck='sudo !!' alias fucking='sudo' ## Colorize grep alias grep='grep --color=auto' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' # Directory aliases alias scripts='cd ~/scripts' alias www='cd /usr/local/var/www' alias ..='cd ..' alias ...='cd ../../' alias ....='cd ../../../' alias .....='cd ../../../../' alias bashreload='source ~/.bash_profile' alias mkexec='chmod +x' alias lg='ls | grep' alias install="sudo apt-get install" #This breaks the make install. alias remove="sudo apt-get remove" alias jewtube='mplayer -xy 600 $(youtube-dl --max-quality 22 -g `xsel`)' # Pacman alias examples alias pacupg='pacaur -Syu' # Synchronize with repositories and then upgrade packages that are out of date on the local system. alias pacin='pacaur -S' # Install specific package(s) from the repositories alias pacins='pacaur -U' # Install specific package not from the repositories but from a file alias pacre='pacaur -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies alias pacrm='pacaur -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies alias pacrep='pacaur -Si' # Display information about a given package in the repositories alias pacreps='pacaur -Ss' # Search for package(s) in the repositories alias pacloc='pacaur -Qi' # Display information about a given package in the local database alias paclocs='pacaur -Qs' # Search for package(s) in the local database alias pacupd='pacaur -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories alias pacinsd='pacaur -S --asdeps' # Install given package(s) as dependencies of another package alias pacmir='pacaur -Syy' # Force refresh of all package lists after updating /etc/pacman.d/mirrorlist #Bash calculator. function calc { echo "${1}" | bc -l; }
Other
#Set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi