Hack. Eat. Sleep. Repeat!!!
#script
- Reads it from a file or if it is passed as an argument with `-c` or from the user terminal
- Breaks the input into words and operators, obeying the quoting rules described in Quoting. These tokens are separated by metacharacters.
- Parses the tokens into simple and compound commands
- Performs the various shell expansions (see Shell Expansions), breaking the expanded tokens into lists of filenames
- Performs any necessary redirections
- Optionally waits for the command to complete and collects its exit status
- Escape Character
- Single Quotes
- Double quotes
- Ansi-c Quoting
- Locale-Specific Translation
\
is the Bash escape character.It preserves the literal value of the next character that follows, with the exception of newline. If a \newline pair appears, and the backslash itself is not quoted, the \newline is treated as a line continuation (that is, it is removed from the input stream and effectively ignored).backslash before a double quotes within 2 double quotes
.The backslash preceding the ‘!’ is not removed.The special parameters ‘*’ and ‘@’ have special meaning when in double quotes.$"hello, world"
, will cause the string to be translated according to the current locale.echo
is the command and a b c
are the arguments.More complex shell commands are composed of simple commands arranged together in a variety of ways: in a pipeline in which the output of one command becomes the input of a second, in a loop or conditional construct, or in some other grouping.if
fi
then
elseif
time
for
in
until
while
do
done
case
esac
coproc
select
function
{
}
[[
]]
!
in
is recognized as a reserved word if it is the third word of a case or select command. in and do are recognized as reserved words if they are the third word in a for command.|
or |&
.e.gls|base64
|&
is used, the standard error is passed to the other command along with the stdout
.|&
is the shorthand for 2>&1
.