uCon HomePage

Script Cmd: ECHO


ECHO [-bcd:ips:t] {any string}

Options:

-b              format the output similar to the 'banner' command.
-c              center text horizontally
-d{delimiter}   specify the delimiter to be used with -s spacing (default is a space).
-i              ignore the backslash-based special formatting characters (see below).
-p              delimiter is a prefix (default is suffix).
-s{count}       number of bytes between each delimiter insertion.
-t              output is put in system trace window (doesn't work with -b).

Echo the specified string to the console. If the string contains whitespace, then it must be enclosed within double quotes.

If the string you want to echo starts with a dash (usually telling the command that an option follows); then use a double-dash ("--") to terminate the option processing.  (see example below).

There are a few special formatting characters that are processed by ECHO (assumes -i is not used)...

'\b' backspace
'\c' end-of-line (do not append the line feed)
'\n' linefeed
'\r' carriage return
'\t' tab
'\xHH' hex character HH
'\\' backslash

Some examples...

Command:

ECHO Hi!

Output:

Hi! (with newline appended)

Command:

ECHO "Hi\n How are you?"

Output:

Hi!
How are you?

Command:

ECHO -b "Hi!"

Output:

#     #           ###
#     #     #     ###
#     #     #     ###
#######     #      #
#     #     #
#     #     #     ###
#     #     #     ###

Command:

ECHO 1122334455667788
ECHO -s2 1122334455667788
ECHO -s4 1122334455667788
ECHO -s2 -d", " 1122334455667788
ECHO -s2 -pd" 0x" 1122334455667788

Output:

1122334455667788
11 22 33 44 55 66 77 88
1122 3344 5566 7788
11, 22, 33, 44, 55, 66, 77, 88,
 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88

Assume the text to be echoed starts with a dash, say "-1-2-3-4", (note the use of the double dash)...

ECHO -- "-1-2-3-4"

Output:

-1-2-3-4