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