1ASA(1P)                    POSIX Programmer's Manual                   ASA(1P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       asa — interpret carriage-control characters
14

SYNOPSIS

16       asa [file...]
17

DESCRIPTION

19       The asa utility shall write its input files to standard output, mapping
20       carriage-control characters from the text files to line-printer control
21       sequences in an implementation-defined manner.
22
23       The first character of every line shall be removed from the input,  and
24       the following actions are performed.
25
26       If the character removed is:
27
28       <space>   The rest of the line is output without change.
29
30       0         A <newline> is output, then the rest of the input line.
31
32       1         One  or more implementation-defined characters that causes an
33                 advance to the next page shall be  output,  followed  by  the
34                 rest of the input line.
35
36       +         The <newline> of the previous line shall be replaced with one
37                 or more implementation-defined characters that causes  print‐
38                 ing  to  return to column position 1, followed by the rest of
39                 the input line. If the '+' is  the  first  character  in  the
40                 input, it shall be equivalent to <space>.
41
42       The  action  of  the  asa  utility is unspecified upon encountering any
43       character other than those listed above as the  first  character  in  a
44       line.
45

OPTIONS

47       None.
48

OPERANDS

50       file      A pathname of a text file used for input. If no file operands
51                 are specified, the standard input shall be used.
52

STDIN

54       The standard input shall be used if no file operands are specified, and
55       shall  be  used  if a file operand is '−' and the implementation treats
56       the '−' as meaning standard input.  Otherwise, the standard input shall
57       not be used.  See the INPUT FILES section.
58

INPUT FILES

60       The input files shall be text files.
61

ENVIRONMENT VARIABLES

63       The following environment variables shall affect the execution of asa:
64
65       LANG      Provide  a  default  value for the internationalization vari‐
66                 ables that are unset or null. (See the Base Definitions  vol‐
67                 ume  of POSIX.1‐2008, Section 8.2, Internationalization Vari‐
68                 ables for the precedence  of  internationalization  variables
69                 used to determine the values of locale categories.)
70
71       LC_ALL    If  set  to  a non-empty string value, override the values of
72                 all the other internationalization variables.
73
74       LC_CTYPE  Determine the locale for the interpretation of  sequences  of
75                 bytes of text data as characters (for example, single-byte as
76                 opposed to  multi-byte  characters  in  arguments  and  input
77                 files).
78
79       LC_MESSAGES
80                 Determine the locale that should be used to affect the format
81                 and contents  of  diagnostic  messages  written  to  standard
82                 error.
83
84       NLSPATH   Determine the location of message catalogs for the processing
85                 of LC_MESSAGES.
86

ASYNCHRONOUS EVENTS

88       Default.
89

STDOUT

91       The standard output shall be the text from the input file  modified  as
92       described in the DESCRIPTION section.
93

STDERR

95       None.
96

OUTPUT FILES

98       None.
99

EXTENDED DESCRIPTION

101       None.
102

EXIT STATUS

104       The following exit values shall be returned:
105
106        0    All input files were output successfully.
107
108       >0    An error occurred.
109

CONSEQUENCES OF ERRORS

111       Default.
112
113       The following sections are informative.
114

APPLICATION USAGE

116       None.
117

EXAMPLES

119        1. The following command:
120
121               asa file
122
123           permits  the  viewing  of file (created by a program using FORTRAN-
124           style carriage-control characters) on a terminal.
125
126        2. The following command:
127
128               a.out | asa | lp
129
130           formats the FORTRAN output of a.out and directs it to the printer.
131

RATIONALE

133       The asa utility is needed to map ``standard'' FORTRAN 77 output into  a
134       form  acceptable to contemporary printers. Usually, asa is used to pipe
135       data to the lp utility; see lp.
136
137       This utility is generally used only by FORTRAN programs.  The  standard
138       developers decided to retain asa to avoid breaking the historical large
139       base of FORTRAN applications that put  carriage-control  characters  in
140       their  output  files. There is no requirement that a system have a FOR‐
141       TRAN compiler in order to run applications that need asa.
142
143       Historical implementations have used an ASCII <form-feed>  in  response
144       to a 1 and an ASCII <carriage-return> in response to a '+'.  It is sug‐
145       gested that implementations treat characters other than 0, 1,  and  '+'
146       as  <space>  in  the  absence of any compelling reason to do otherwise.
147       However, the action is listed here as  ``unspecified'',  permitting  an
148       implementation to provide extensions to access fast multiple-line slew‐
149       ing and channel seeking in a non-portable manner.
150

FUTURE DIRECTIONS

152       None.
153

SEE ALSO

155       fort77, lp
156
157       The Base Definitions volume of  POSIX.1‐2008,  Chapter  8,  Environment
158       Variables
159
161       Portions  of  this text are reprinted and reproduced in electronic form
162       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
163       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
164       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
165       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
166       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
167       event of any discrepancy between this version and the original IEEE and
168       The Open Group Standard, the original IEEE and The Open Group  Standard
169       is  the  referee document. The original Standard can be obtained online
170       at http://www.unix.org/online.html .
171
172       Any typographical or formatting errors that appear  in  this  page  are
173       most likely to have been introduced during the conversion of the source
174       files to man page format. To report such errors,  see  https://www.ker
175       nel.org/doc/man-pages/reporting_bugs.html .
176
177
178
179IEEE/The Open Group                  2013                              ASA(1P)
Impressum