📄 read.n
字号:
'\"'\" Copyright (c) 1993 The Regents of the University of California.'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) read.n 1.15 96/08/26 13:00:09'\" .so man.macros.TH read n 7.5 Tcl "Tcl Built-In Commands".BS'\" Note: do not modify the .SH NAME line immediately below!.SH NAMEread \- Read from a channel.SH SYNOPSIS\fBread \fR?\fB\-nonewline\fR? \fIchannelId\fR.sp\fBread \fIchannelId numBytes\fR.BE.SH DESCRIPTION.PPIn the first form, the \fBread\fR command reads all of the data from\fIchannelId\fR up to the end of the file.If the \fB\-nonewline\fR switch is specified then the last characterof the file is discarded if it is a newline.In the second form, the extra argument specifies how many bytes toread. Exactly that many bytes will be read and returned, unlessthere are fewer than \fInumBytes\fR left in the file; in this caseall the remaining bytes are returned..PPIf \fIchannelId\fR is in nonblocking mode, the command may not readas many bytes as requested: once all available input has been read,the command will return the data that is available rather than blockingfor more input.The \fB\-nonewline\fR switch is ignored if the command returnsbefore reaching the end of the file..PP\fBRead\fR translates end-of-line sequences in the input intonewline characters according to the \fB\-translation\fR optionfor the channel.See the manual entry for \fBfconfigure\fR for details on the\fB\-translation\fR option..SH "SEE ALSO"eof(n), fblocked(n), fconfigure(n).SH KEYWORDSblocking, channel, end of line, end of file, nonblocking, read, translation
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -