DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

dup(TCL)


dup -- duplicate an open file

Syntax

dup fileId [targetFileId]

Description

Duplicates an open file. A new file ID is opened that addresses the same file as fileId.

If targetFileId is specified, then the file is dup to this specified file ID. Normally this is stdin, stdout, or stderr. The dup command will handle flushing output and closing this file. The target file should be open if it is one of stdin, stdout, or stderr and the process is not going to do an execl. Otherwise internal C code that uses one of these files via direct access to stdio FILE struct may behave strangely or fail.


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003