line — Read One Line
Synopsis
/usr/bin/line
Description
The line command copies one line (up to and including a newline) from the standard input and writes it on the standard output. It returns an exit status of 1 on end-of-file and always prints at least a newline. It is often used within shell files to read from the user's terminal.
Examples
When you invoke the line command, it enters a newline and waits for you to type a line. When you press Return, the line is echoed to standard output, as shown in the following example.
castle% line This is a line This is a line castle%
Exit Status
0 | Successful completion. |
>0 | End-of-file on input. |
Attributes
See attributes(5) for descriptions of the following attributes:
Attribute Type | Attribute ... |
---|
Get Solaris™ 7 Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.