The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 NAME

asa - interpret carriage-control characters

 SYNOPSIS

asa [file ...]

 DESCRIPTION

The asa utility will write its input files to standard output, mapping carriage-control characters from the text files to line-printer control sequences in an implementation-dependent manner.

The first character of every line will be removed from the input, and the following actions will be performed:

If the character removed is:

space
The rest of the line will be output without change.
0
A newline character will be output, then the rest of the input line.
1
One or more implementation-dependent characters that causes an advance to the next page will be output, followed by the rest of the input line.
+
The newline character of the previous line will be replaced with one or more implementation-dependent characters that causes 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.

The action of the asa utility is unspecified upon encountering any character other than those listed above as the first character in a line.

 OPTIONS

None.

 OPERANDS

file
A pathname of a text file used for input. If no file operands are specified, the standard input will be used.

 STDIN

The standard input will be used only if no file operands are specified. See the INPUT FILES section.

 INPUT FILES

The input files must be text files.

 ENVIRONMENT VARIABLES

The following environment variables affect the execution of asa:
LANG
Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation 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 internationalisation 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.
NLSPATH
Determine the location of message catalogues for the processing of LC_MESSAGES .

 ASYNCHRONOUS EVENTS

Default.

 STDOUT

The standard output will be the text from the input file modified as described in the DESCRIPTION section.

 STDERR

None.

 OUTPUT FILES

None.

 EXTENDED DESCRIPTION

None.

 EXIT STATUS

The following exit values are returned:
0
All input files were output successfully.
>0
An error occurred.

 CONSEQUENCES OF ERRORS

Default.

 APPLICATION USAGE

None.

 EXAMPLES

The following command:

asa file

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 and directs it to the printer.

 FUTURE DIRECTIONS

None.

 SEE ALSO

fort77, lp.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]