Originally posted by Bala Pisupati
Originally posted by garry r fisher
#!/usr/bin/ksh# this line to escape the next line from the tcl interpreter exec hcitcl "$0" "$@"
#!/usr/bin/ksh# this line to escape the next line from the tcl interpreter exec hcitcl "$0" "$@"# Begin Module Header ==============================================================================##------# Name:#------## file_mtime.tcl##---------# Purpose:#---------## Display to sdtout the mtime (last modification time) of the specified file# In the following format:## CCYY.MM.DD__HH.MM.SS##--------# Inputs:#--------# set name [lindex $argv 0] if {[cequal $name ""]} then {exit}##-------# Notes:#-------## none##---------# History:#---------## 2001.02.16 Russ Ross# - wrote initial version## End of Module Header =============================================================================set type [file type $name]if [cequal "$type" "file"] { set mtime [file mtime $name] puts stdout [fmtclock $mtime "%Y.%m.%d__%H.%M.%S"]}