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

NAME

12       asa — interpret carriage-control characters
13

SYNOPSIS

15       asa [file...]
16

DESCRIPTION

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

OPTIONS

46       None.
47

OPERANDS

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

STDIN

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

INPUT FILES

59       The input files shall be text files.
60

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

87       Default.
88

STDOUT

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

STDERR

94       None.
95

OUTPUT FILES

97       None.
98

EXTENDED DESCRIPTION

100       None.
101

EXIT STATUS

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

CONSEQUENCES OF ERRORS

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

APPLICATION USAGE

115       None.
116

EXAMPLES

118        1. The following command:
119
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
129               a.out | asa | lp
130
131           formats the FORTRAN output of a.out and directs it to the printer.
132

RATIONALE

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

FUTURE DIRECTIONS

153       None.
154

SEE ALSO

156       fort77, lp
157
158       The Base Definitions volume of  POSIX.1‐2017,  Chapter  8,  Environment
159       Variables
160
162       Portions  of  this text are reprinted and reproduced in electronic form
163       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
164       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
165       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
166       Electrical  and  Electronics Engineers, Inc and The Open Group.  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.opengroup.org/unix/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                  2017                              ASA(1P)
Impressum