asa(1)


asa -- interpret carriage-control characters

Synopsis

asa [file] ...

Description

The asa command writes the named files to the standard output mapping carriage-control characters from the files to line printer control sequences as described below.

The first character of every line will be removed from the input. Additionally, if the character removed is:


space
The rest of the line will be output without change.

0
A newline character will be output, followed by the rest of the input line.

1
A line feed is output, followed by the rest of the input line.

+
The newline character of the previous line is replaced with a carriage return, causing printing to return to column position 1, followed by the rest of the input line. If the ``+'' is the first character in the input, it will have the same effect as the space character.

Any character other than those listed above that appears as the first character in a line is ignored.

Operands

The file parameter is the path of an existing file. More than one file may be specified.

Input

Input files must be plain text files. If no file parameter is specified, then asa interprets characters typed to the standard input.

Environment variables

The following environment variables affect the execution of asa:

LANG
Provide a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility will behave as if none of the variables had been defined.

LC_ALL
If set to a non-empty string value, override the values of all the other internationalization variables.

LC_CTYPE
Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files).

LC_MESSAGES
Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.

Output

The standard output is the text from the input file modified as described in the Description.

Exit codes

An exit values of 0 indicates that all input files were output successfully. A value greater than 0 indicates that an error occurred while processing the input.

Usage

The following command:

asa textfile

permits the viewing of file (created by a program using FORTRAN-style carriage control characters) on a terminal.

The following command:

a.out | asa | lp

formats the FORTRAN output of a.out (presumably a previously compiled FORTRAN program) and directs it to the default printer.

References

lp(1)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004