File input and output commands
These commands include those to search ASCII-sorted data files,
copy files, duplicate file descriptors,
control file access options, retrieve open
file status, and create pipes with the pipe system call.
An interface to the select system call is available on
UNIX systems that support it.
Tcl file I/O is implemented on top of the stdio library.
By default, the file is buffered.
When communicating to a process through a pipe, a flush
command should be issued to force the data out.
Alternatively, the fcntl command may be used to set the buffering
mode of a file to line-buffered or unbuffered.
Available commands are:
searchs an open file for a match
closes an open file
copies the remainder of file1 to file2
duplicates an open file
checks for an end-of-file condition on an open file
sets, clears, or returns file options
manipulates file names and attributes
creates a lock on all or part of a file
flushes buffered output for a file
implements a loop over contents of a file
removes a lock created by
renames an old path to a new path
obtains status information on an open file
reads a line from a file
reads the next Tcl list from a file and discards the terminating newline
opens a file
creates a pipe
writes to a file
reads from a file
reads a file and returns its contents as a string
waits for files to come available or satisfy conditions
changes the access position for an open file
returns the current access position for an open file
writes strings to a specified file
List handling commands
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003