*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> line (1)              


 line(1)                                                             line(1)

 NAME    [Toc]    [Back]
      line - read one line from user input

 SYNOPSIS    [Toc]    [Back]
      line [-t timeout]

 DESCRIPTION    [Toc]    [Back]
      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.

    Options    [Toc]    [Back]
      line recognizes the following command-line option:

           -t timeout  Timeout after timeout seconds where timeout is an
                       integer value (if a non-integer value is specified,
                       it is converted to an integer; i.e., rounded down).
                       A blank is required between -t and the timeout
                       argument.  This option is not documented in POSIX and
                       other industry standards, and should not be used in
                       portable applications.

    International Code Set Support
      Single- and multi-byte character code sets are supported.

 EXAMPLES    [Toc]    [Back]
      The following lines in a shell script prompt for a file name and
      display information about the file:

           echo 'Enter file name: \c'
           ls -l $reply

      To limit the response time to 10 seconds, use the form:

           reply=`line -t 10`

      then test for no response.  If no response occurs before timeout
      expires, a default behavior should be provided.

 WARNINGS    [Toc]    [Back]
      This command is likely to be withdrawn from X/Open standards.
      Applications using this command might not be portable to other
      vendors' systems. As an alternative read is recommended.

 SEE ALSO    [Toc]    [Back]
      sh(1), read(2).

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003

 line(1)                                                             line(1)

      line: SVID2, SVID3, XPG2, XPG3

 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
read IRIX read a line from standard input
read HP-UX read a line from standard input
line IRIX read one line
gets IRIX Read a line from a file
openpam_readline FreeBSD read a line from a file
read FreeBSD read input
readv NetBSD read input
pread NetBSD read input
preadv NetBSD read input
preadv OpenBSD read input
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service