asa

Translate line-printer control sequences to newlines/form feeds (POSIX)

Syntax:

asa [filename...]

Runs on:

QNX Neutrino

Options:

None.

Description:

The asa utility writes its input files to standard output, mapping carriage control characters from the files to line-printer control sequences. If you specify - for a file name, asa reads from standard input.

All characters in column position 1 are removed from the input, and the following actions are performed, depending on the character:

Space
The rest of the line is output without change.
0
A newline (\n) character is output, followed by the rest of the input line.
1
A form-feed character (0x0C) is output, followed by the rest of the input line.
+
The newline of the previous line is replaced with a carriage return (0x0D), followed by the rest of the input line.

Any other character in column 1 is left unchanged.

Exit status:

0
All input files were output successfully.
>0
An error occurred.