3BSD/usr/man/man1/gets.1

Compare this file to the similar file:
Show the results in this format:

.TH GETS 1 10/11/79
.UC
.SH NAME
gets \- get a string from standard input
.SH SYNOPSIS
.B gets
[ default ]
.SH DESCRIPTION
.I Gets
can be used with
.IR csh (1)
to read a string from the standard input.
If a
.I default
is given it is used if just return is typed, or if an error occurs.
The resultant string (either the default or as read from the standard
input is written to the standard output.
If no
.I default
is given and an error occurs,
.I gets
exits with exit status 1.
.SH EXAMPLES
Using csh:
.br
    echo setenv TERM \e\ec
    setenv TERM `gets adm3a`
.br
Using sh:
.br
    echo \-n TERM=
    TERM=`gets adm3a`
    export TERM
.SH "SEE ALSO"
csh (1)
.SH BUGS