Version 9 of ftruncate

Updated 2012-02-13 11:54:30 by fh

ftruncate is a command in TclX:

From the man pages:

ftruncate [-fileid] file newsize

Truncate file to have a length of at most newsize bytes.

If the option -fileid is specified, file is an open file identifier, otherwise it is a file path.

This command is not available or not fully functional if the underlying operating system support is not available.

The command infox have_truncate will indicate if this command may truncate by file path. The command infox have_ftruncate will indicate if this command may truncate by file id.

The -fileid option is not available on Windows 95/NT.


MHo 10-Nov-2008: what about a file truncate <filename> subcommand in the core?

DKF: Also see chan truncate.


fh - 2012-02-13 11:54:30

To search IP ADDRESS using Regular Expression

set  IP "The Interface IP Address is 198.176.17.16 "
regexp {(25[0-5]|2[0-9][0-9]|[0-9]?[0-9][0-9]?)\.{3}(25[0-5]|2[0-9][0-9]|[0-1]?[0-9][0-9]?) $IP match 
set $match