summaryrefslogtreecommitdiff
path: root/share/tools/prstats/cut.tcl
blob: 85ee45a1343d35bd0ccc73ed24c0d94814abbf0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/local/bin/tclsh8.3
#
# $FreeBSD$
#

set t [clock seconds]
set t0 [expr $t - [lindex $argv 0] * 86400]

set fi [open [lindex $argv 1]]
set fo [open [lindex $argv 2] w]
while {[gets $fi a] >= 0} {
	if {[lindex $a 2] > $t0} {
		puts $fo $a
	}
}