BSD 3 development
[unix-history] / usr / man / man1 / gets.1
CommitLineData
b7993a08
BJ
1.TH GETS 1 10/11/79
2.UC
3.SH NAME
4gets \- get a string from standard input
5.SH SYNOPSIS
6.B gets
7[ default ]
8.SH DESCRIPTION
9.I Gets
10can be used with
11.IR csh (1)
12to read a string from the standard input.
13If a
14.I default
15is given it is used if just return is typed, or if an error occurs.
16The resultant string (either the default or as read from the standard
17input is written to the standard output.
18If no
19.I default
20is given and an error occurs,
21.I gets
22exits with exit status 1.
23.SH EXAMPLES
24Using csh:
25.br
26 echo setenv TERM \e\ec
27 setenv TERM `gets adm3a`
28.br
29Using sh:
30.br
31 echo \-n TERM=
32 TERM=`gets adm3a`
33 export TERM
34.SH "SEE ALSO"
35csh (1)
36.SH BUGS