Excerpt from: Rookie Tutorial http://www.runoob.com/linux/linux-shell-echo.html
Shell command
1. Echo command
String output
echo "ok! \c "
echo "It is a test"
Output: ok! It is a test
2. printf command
Formatted output
%d%s%f
Escape sequence:
\a: Warning Character
\b: Back
\c: Suppresses (does not display) the newline character at any end of the output (only valid in the parameter string under the%B format designator control), and any characters left in the argument, any subsequent arguments, and any characters left in the format string are ignored
\f: Page Change
\ n: Line break
\ r: Enter
\ t: Horizontal tab
\v: Vertical tab
\ \: Backslash character
\ddd:1 to 3-bit octal value character, valid only in format string
\0DDD: An octal value character that represents 1 to 3
3. Test command
Check if a condition is true and you can test arrays, characters, and files
Such as:
NUM1=
num2=
If test $[num1] -eq $[num2]
< Span class= "PLN" >< Span class= "PLN" >< Span class= "PLN" >then
< Span class= "PLN" >< Span class= "PLN" >< Span class= "PLN" > echo ' two numbers equal! '
< Span class= "PLN" >< Span class= "PLN" >< Span class= "PLN" >else
< Span class= "PLN" >< Span class= "PLN" >< Span class= "PLN" >< Span class= "PLN" > echo ' two numbers are not equal! '
< Span class= "PLN" >< Span class= "PLN" >< Span class= "PLN" >< Span class= "PLN" >fi
< Span class= "PLN" >< Span class= "PLN" >< Span class= "PLN" >< Span class= "PLN" > output: two numbers equal!
For specific parameters see: http://www.runoob.com/linux/linux-shell-test.html
Shell Script (iii)