1.3.34 echo

Displays only textual strings.

Backslashes can be used as follows:

  • C escape sequences, for example, "\n" can be used to print a new line

  • Leading and trailing spaces are not displayed unless escaped with a backslash

  • Quoted strings are printed literally including the quote marks.

Syntax

echo string

Where:

string

Specifies a string of characters.

Example 1-37 Examples

echo "   initializing..."    # Display: "   initializing..." (includes quotes)
echo Stage 1\n               # Display: Stage 1 (followed by a new line)
echo \	Init               # Display:    Init (includes leading spaces)
echo 4+4                     # Display: 4+4
Non-ConfidentialPDF file icon PDF versionARM DUI0452Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.