Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ line(1) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)

read(2)



     line(1)                    DG/UX 4.30                     line(1)



     NAME
          line - read one line

     SYNOPSIS
          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





















     Licensed material--property of copyright holder(s)         Page 1



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