In Bash, there are two closely related āspecial parametersā for accessing how the current script was invoked: $*
and $@
. For both variables, the behavior is affected by whether or not the variable is enclosed in double quotes. The following table summarizes all cases:
Form Meaning
$* $1 $2 $3...
$@ $1 $2 $3...
"$*" "$1 $2 $3..."
"$@" "$1" "$2" "$3"...
bash
Bash-my-AWS is a simple but extremely powerful set of CLI commands for managing resources on Amazon Web Services.
bash awsBash is powerful, it is super permissive, and because of that, it is extremely easy to do something stupid with it. This blogpost is more about good conventions in bash, not it's syntax or how to do basic stuff with it.
bash shellLike programming in C or driving a car, contemporary shellscript languages require some knowledge and discipline to use safely, but that's not to say it can't be done. This guide is here to show that in bash, it can be done. Specifically, those systematic bugs that the language encourages can be eliminated by disciplines that are outlined here. Realize that Bash is not a language where the correct way to do something is also the easiest.
bash shellThis wiki is intended to provide human-readable documentation and information so users aren't forced to read every bit of the Bash manpage - which can be difficult to understand.
bash shellYou donāt have to look hard on the internet to find plenty of useful one-liners in bash, or scripts. And there are guides to bash that seem somewhat intimidating through either their thoroughness or their focus on esoteric detail.
Here Iāve focussed on the things that either confused me or increased my power and productivity in bash significantly, and tried to communicate them in a way that emphasises getting the understanding right.
tutorial bashThe ANSI/VT100 terminals and terminal emulators are not just able to display black and white text ; they can display colors and formatted texts thanks to escape sequences. Those sequences are composed of the Escape character (often represented by ^[
or <Esc>
) followed by some other characters: <Esc>[FormatCodem
.
Handy one line scripts for awk
howto shell sysadmin bash cheatsheet reference programming unix linux awkGood list of linux / bash tips & tricks.
linux tips bash tools programming