Echo (command) - Usage Example

Usage Example

$ echo This is a test. This is a test. $ echo "This is a test." > ./test.txt $ < ./test.txt This is a test.

Some variants of Unix support options such as -n and -e. These are not standard due to historical incompatibilities between BSD and System V; the printf command can be used in situations where this is a problem.


Using ANSI escape code SGR sequences, compatible terminals can print out colored text:

FGRED=`echo "\033[31m"` FGCYAN=`echo "\033[36m"` BGRED=`echo "\033[41m"` FGBLUE=`echo "\033[35m"` BGGREEN=`echo "\033[42m"` NORMAL=`echo "\033[m"` and after : echo "${FGBLUE} Text in blue ${NORMAL}" echo "Text normal" echo "${BGRED} Background in red" echo "${BGGREEN} Background in Green and back to Normal ${NORMAL}"

Read more about this topic:  Echo (command)

Famous quotes containing the word usage:

    Pythagoras, Locke, Socrates—but pages
    Might be filled up, as vainly as before,
    With the sad usage of all sorts of sages,
    Who in his life-time, each was deemed a bore!
    The loftiest minds outrun their tardy ages.
    George Gordon Noel Byron (1788–1824)

    ...Often the accurate answer to a usage question begins, “It depends.” And what it depends on most often is where you are, who you are, who your listeners or readers are, and what your purpose in speaking or writing is.
    Kenneth G. Wilson (b. 1923)