print

print [ -acilmnNoOPrsz ] [ -u n ] [ -f format ] [ -C cols ] [ -R [ -en ]] [ arg ... ]

With the -f option the arguments are printed as described by printf. With no flags or with the flag -, the arguments are printed on the standard output as described by echo, with the following differences: the escape sequence \M-x metafies the character x (sets the highest bit), \C-x produces a control character (\C-@ and \C-? give the characters NULL and delete), and \E is a synonym for \e. Finally, if not in an escape sequence, \ escapes the following character and is not printed.

Option Description

-a

Prints the arguments with the column incrementing first. Only useful with the -c and -C options.

-c

Print the arguments in columns. Unless -a is also given, arguments are printed with the row incrementing first.

-C cols

Print the arguments in cols columns. Unless -a is also given, arguments are printed with the row incrementing first.

-i

If given together with -o or -O, sorting is performed case-independently.

-l

Print the arguments separated by newlines instead of spaces.

-m

Take the first argument as a pattern (should be quoted), and remove it from the argument list together with subsequent arguments that do not match this pattern.

-n

Do not add a newline to the output.

-N

Print the arguments separated and terminated by nulls.

-o

Print the arguments sorted in ascending order.

-O

Print the arguments sorted in descending order.

-P

Perform prompt expansion

-r

Ignore the escape conventions of echo.

-R

Emulate the BSD echo command, which does not process escape sequences unless the -e flag is given. The -n flag suppresses the trailing newline. Only the -e and -n flags are recognized after -R; all other arguments and options are printed.

-s

Place the results in the history list instead of on the standard output.

-u n

Print the arguments to file descriptor n.

-z

Push the arguments onto the editing buffer stack, separated by spaces.

If any of -m, -o or -O are used in combination with -f and there are no arguments (after the removal process in the case of -m) then nothing is printed.

Note: The Symbian platform does not support the use of the -b, -d, and -p options.