Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/u/uesh.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/u/uesh.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/u/uesh.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/u/uesh.html on line 8

uesh

Micro-embedded shell (QNX Neutrino)

Syntax:

uesh [script_file]

Runs on:

Neutrino

Options:

script_file
A file containing shell commands to execute.

Description:

The uesh utility provides a subset of the functionality found in the standard embedded shell, esh. You should find uesh useful for situations where memory requirements are limited. For example, you could use it to run a simple system initialization file for an embedded system.

The micro-embedded shell has some very significant limitations:

For applications that require greater functionality, use esh or the full shell, sh.

Command-line format

In uesh, command lines take this form:

command arg1 arg2 ... [redir-op file] [&]

Where:

command
The command to be executed. If it doesn't start with a slash, the command follows the path set by the PATH environment variable.
redir-op file
A redirection operator. When a command is invoked, three standard files are set up in its environment. These files, standard input, standard output, and standard error output (stdin, stdout, stderr), are usually attached to the active terminal. You can redirect a command's standard input, standard output, and standard error as follows:
Specifying:  Will:
<file redirect standard input from this file.
>file Redirect standard output to this file. If the file exists, it's overwritten; if the file doesn't exist, it's created.
>>file Redirect standard output to this file. If the file exists, the information is appended to the end of the file; if the file doesn't exist, it's created.
2>file Do the same as >file, but for standard error.
2>>file Do the same as >>file, but for standard error.
& If a command contains an unquoted &, then uesh doesn't wait for the command to complete execution but immediately moves on to process the next command. The standard input of the command is redirected from /dev/null, and SIGINT and SIGQUIT are ignored.

Filename expansion

The uesh shell doesn't support filename expansion. Such shorthands as *.c for all files ended in .c don't work.

Quoting

The following characters have a special meaning in uesh:

&  \  "  [  space

To suppress the special meaning of these characters and keep their literal meaning, use quoting.

To quote a sequence of characters or sequence of words, enclose the sequence in double quotes. To quote a single character, use double quotes or precede it with the escape character (\).

Escape character (backslash)
The escape character (\) preserves the literal meaning of the next character. You can't obtain a single backslash by quoting \ with double quotes. To obtain a backslash, enter \\ instead.
Double quotes
Enclosing characters and words in double quotes ("") preserves the literal meaning of all characters within double quotes, with the exception of the \ character. For example:
"ab cd"

represents a single, five-character argument.

You can keep the literal meaning of a double quote with the \ character. For example:

ab\"cd

represents the single, five-character argument ab"cd.

Builtin commands

The following commands are built into uesh (that is, uesh interprets and executes them internally):

cd command

cd [directory]

Change the working directory of the current execution environment. If directory isn't specified, the value of the HOME environment variable becomes the new working directory.

emount command

emount special directory [fs_type]

Mount a special device. The arguments are:

special
The name of the special device.
mountpoint
Where to mount the device on your system.
type
The type of filesystem or manager to mount:
type: Filesystem or manager:
cd fs-cd.so
cifs fs-cifs
dos fs-dos.so
ext2 fs-ext2.so
mac fs-mac.so
nfs fs-nfs2, fs-nfs3
nt fs-nt.so
qnx4 fs-qnx4.so
qnx6 fs-qnx6.so
udf fs-udf.so

The default is qnx4.


Note: The emount command was implemented in QNX Momentics 6.3.0 Service Pack 2.

ewaitfor command

ewaitfor path [max_seconds [delay]]

Wait until the given path exists. The arguments are:

path
The path to test.
max_seconds
The maximum number of seconds to wait for the file to appear. The default is 1 second.
delay
The number of milliseconds to wait between attempts. The default is 100 ms.

Note: The ewaitfor command was implemented in QNX Momentics 6.3.0 Service Pack 2.

exec command

exec [command [argument...]]

Execute a command and/or manipulate file descriptors.

The exec command opens, closes, or copies file descriptors as specified by any I/O redirections given as part of argument. If a command is specified, that command is spawned as a replacement for uesh. Any specified arguments are passed to the spawned process.

exit command

exit [n]

Cause uesh to exit with the exit status specified by n. If n isn't specified, uesh exits with the status of the last command executed.

export command

export name[=word]...
export -p

Mark environment variables for export, which causes them to be in the environment of subsequently executed commands. If you specify the -p option, the names and values of all exported variables are written to the standard output.

Examples:

Invoke uesh:

uesh

Environment variables:

HOME
The pathname of the user's home directory
LOGNAME
The user's login name.
PATH
The directory search path used by uesh for locating executable programs. To change PATH, you must use the export command.

If PATH isn't in the existing environment when uesh is invoked, it's set to /bin:/usr/bin. For more information on setting PATH, see Setting PATH and LD_LIBRARY_PATH in the Configuring Your Environment chapter of the Neutrino User's Guide.

SHELL
The pathname of the user's preferred shell.
TERM
The terminal type.
TMPDIR
The pathname of a directory where utilities can create temporary files.
TZ
The timezone setting.

See also:

esh, fesh, ksh, rsh, sh

Setting PATH and LD_LIBRARY_PATH in the Configuring Your Environment chapter of the Neutrino User's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/u/uesh.html on line 540

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/u/uesh.html on line 540