Examples – Comtrol eCos User Manual

Page 118

Advertising
background image

alias

If no value is provided, then the current value of the alias is displayed.

If the system supports non-volatile configuration data via the fconfig command (see

the Section called Persistent

State Flash-based Configuration and Control in Chapter 2

), then the value will be saved and used when the system

is reset.

Examples

Set an alias.

RedBoot> alias joe "This is Joe"

Update RedBoot non-volatile configuration - continue (y/n)? n

Display an alias.

RedBoot> alias joe

’joe’ = ’This is Joe’

Use an alias. Note: the "=" command simply echoes the command to to console.

RedBoot> = %{joe}

This is Joe

Aliases can be nested.

RedBoot> alias frank "Who are you? %{joe}"

Update RedBoot non-volatile configuration - continue (y/n)? n

RedBoot> = %{frank}

Who are you? This is Joe

Notice how the value of %{frank} changes when %{joe} is changed since the value of %{joe} is not evaluated
until %{frank} is evaluated.

RedBoot> alias joe "This is now Josephine"

Update RedBoot non-volatile configuration - continue (y/n)? n

RedBoot> = %{frank}

Who are you? This is now Josephine

14

Advertising