ASA(1POSIX)
π ASA(1POSIX) π
ok so bestie, welcome to the POSIX Programmer's Manual page for asa, section 1. pull up a chair, grab a strawberry π, and let's get into it.
πΈ PROLOG πΈ
ok so first things first, this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ, so lowkey go check the corresponding Linux manual page for the deets on Linux behavior. or β and hear me out β the interface might not even be implemented on Linux at all. π not me finding out the hard way. so like, vibe check your system first.
β¨ NAME β¨
asa β interpret carriage-control characters π
π SYNOPSIS π
asa [file...]
π¦ DESCRIPTION π¦
ok so here's the tea β. the asa utility shall write its input files to standard output, mapping carriage-control characters from the text files to line-printer control sequences in an implementation-defined manner. yes bestie, "implementation-defined" β that's the whole vibe of this one.
the first character of every line shall be removed from the input, and then the following actions are performed. π
so if the character removed is:
<space>β the rest of the line is output without change. no notes, it just vibes through. β¨0β a<newline>is output, then the rest of the input line.1β one or more implementation-defined characters that causes an advance to the next page shall be output, followed by the rest of the input line. πβ‘οΈ+β the<newline>of the previous line shall be replaced with one or more implementation-defined characters that causes printing to return to column position 1, followed by the rest of the input line. and if the'+'is the first character in the input, it shall be equivalent to<space>. periodt. π
β οΈ okay so important: the action of the asa utility is unspecified upon encountering any character other than those listed above as the first character in a line. so like, don't do that. fr fr.
π OPTIONS π
None. not a single one. she's minimal, she's iconic, she needs nothing. π
π OPERANDS π
fileβ a pathname of a text file used for input. and if no file operands are specified, the standard input shall be used. π«Ά
β STDIN β
so the standard input shall be used if no file operands are specified, and shall be used if a file operand is '-' and the implementation treats the '-' as meaning standard input. otherwise, the standard input shall not be used. see the INPUT FILES section, bestie. π
πΈ INPUT FILES πΈ
the input files shall be text files. that's it. that's the section. π
π§ ENVIRONMENT VARIABLES π§
the following environment variables shall affect the execution of asa:
LANGβ provide a default value for the internationalization variables that are unset or null. (see the Base Definitions volume of POSIX.1β2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)LC_ALLβ if set to a non-empty string value, override the values of all the other internationalization variables. she overrides. main character energy πLC_CTYPEβ determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte 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 catalogs for the processing ofLC_MESSAGES.
π₯ ASYNCHRONOUS EVENTS π₯
Default. she's chill like that. π
β¨ STDOUT β¨
the standard output shall be the text from the input file modified as described in the DESCRIPTION section. go back up and reread it if you skipped, i see you. π
π STDERR π
None. silence. iconic behavior. π€«
π OUTPUT FILES π
None.
π¦ EXTENDED DESCRIPTION π¦
None.
π EXIT STATUS π
the following exit values shall be returned:
0β all input files were output successfully. slay! β>0β an error occurred. π
π CONSEQUENCES OF ERRORS π
Default.
the following sections are informative.
π 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. so cute, so useful π«Ά
- the following command:
a.out | asa | lp
formats the FORTRAN output of a.out and directs it to the printer. β¨ pipeline princess β¨
π§ RATIONALE π§
ok so the asa utility is needed to map "standard" FORTRAN 77 output into a form acceptable to contemporary printers. usually, asa is used to pipe data to the lp utility; see lp.
this utility is generally used only by FORTRAN programs. the standard developers decided to retain asa to avoid breaking the historical large base of FORTRAN applications that put carriage-control characters in their output files. there is no requirement that a system have a FORTRAN compiler in order to run applications that need asa. so like, you can run the apps without the whole compiler situation. we love accessibility. π
historical implementations have used an ASCII <form-feed> in response to a 1 and an ASCII <carriage-return> in response to a '+'. it is suggested that implementations treat characters other than 0, 1, and '+' as <space> in the absence of any compelling reason to do otherwise. however, the action is listed here as "unspecified", permitting an implementation to provide extensions to access fast multiple-line slewing and channel seeking in a non-portable manner. π iykyk.
β FUTURE DIRECTIONS β
None. the future is bright and also empty. π
πΈ SEE ALSO πΈ
fort77, lp
the Base Definitions volume of POSIX.1β2017, Chapter 8, Environment Variables
π COPYRIGHT π
portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
ok that's the whole page bestie, you ate that π β¨ this masterpiece was brought to you by IEEE/The Open Group, dated 2017, and it lives at ASA(1POSIX). go forth and interpret those carriage-control characters, queen. ππ¦π
π¦ where this page comes from
- debian bookworm: manpages-posix 2017a-2 Β· Other
- debian trixie: manpages-posix 2017a-2 Β· Other
- ubuntu jammy: manpages-posix 2017a-2 Β· Other
- ubuntu noble: manpages-posix 2017a-2 Β· Other
- ubuntu resolute: manpages-posix 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms