Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ line(1) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                  line(1)



        _________________________________________________________________
        line                                                      Command
        read one line
        _________________________________________________________________


        SYNTAX

        line


        DESCRIPTION

        Line copies one line (up to a new-line) from the standard input
        and writes it on the standard output.  It returns an exit code of
        1 on EOF and always prints at least a new-line.  It is often used
        within shell files to read from the user's terminal.



        _________________________________________________________________
        EXAMPLES

        This example is a shell program that gathers information about
        users.
        $ echo "ENTER YOUR NAME"
        $ NAME=`line`
        $ echo "ENTER YOUR DEPARTMENT NUMBER:"
        $ DEPT=`line`
        $ echo "$NAME $DEPT" >> personnel

        First, the program queries you for your name.  Because line is
        surrounded by grave accents, the program executes it, and line
        reads the name and assigns the name to the variable "NAME".  Then
        the program asks for your department and office extension.  The
        program assigns these values to "DEPT" The last line appends
        "NAME"and "DEPT" to the file "personnel".
        _________________________________________________________________


        SEE ALSO

        sh(1).
        read(2) in the Programmer's Reference for the DG/UX System










        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026