echo & printf

echo

-e 代表後面會執行跳脫字元像是 \n-n 則會略過

printf format-string [arguments…]

format-string: 輸出的格式定義
arguments: 參數清單
格式定義說明
\”double quote
\\backslash
\aalert (BEL)
\bbackspace
\cproduce no further output
\eescape
\fform feed
\nnew line
\rcarriage return
\thorizontal tab
\vvertical tab
\NNNbyte with octal value NNN (1 to 3 digits)
\xHHbyte with hexadecimal value HH (1 to 2 digits)
\uHHHHUnicode (ISO/IEC 10646) character with hex value HHHH (4 digits)
\UHHHHHHHHUnicode character with hex value HHHHHHHH (8 digits)
%%a single %
%bARGUMENT as a string with ‘\’ escapes interpreted, except that octal escapes are of the form \0 or \0NNN
%qARGUMENT is printed in a format that can be reused as shell input, escaping non-printable characters with the proposed POSIX $” syntax.