đģ Bash
If you want scripts that are works of art check out Stack Overflow.
sudo ln -sf bash /bin/sh
Debian / Ubuntu
sudo apt-get install bash-completion
vim ~/.bashrc
++ source /etc/profile.d/bash_completion.sh
Arch
sudo pacman -S bash-completion
vim ~/.bashrc
++ source /usr/share/bash-completion/bash_completion
$@
All user issued args$#
Number of args$0
First arg (script/program)${10}
9th arg (10+ requires brackets)$1
Second arg (user defined arg e.g. –help)$!
Process id of last command$?
Exit status id of last command$*
All user issued args double quoted
Package
moreutils
errno errorcodes
cat /box 2> /dev/null
command | xclip -selection c
# Enable pause
# Uses: pause;command
function pause(){
echo "Press [Enter] to continue...";grep $1 2>/dev/null;read
}
- Example:
pause; echo "Pause Complete"
I use this in conjunction with Tmux helper Tmuxinator, so that STDOUT renders out everything correctly