On Sun, 06 Jun 1999, [EMAIL PROTECTED] wrote:
> I wouldn't recommend the "> /dev/null" command. If you start it remotely,
> the stdout and stderr usually (but not always) go to e-mail. This way you
> can still see the output and not lose any critical messages...
I pipe the output to a program that keeps the last 25 lines in a file.
phma
---
[phma@littlecat bin]$ cat runtail
#!/usr/bin/tclsh
# Reads standard input and writes the last n lines to a file.
# Usage: runtail n file
proc outem {} {
global n ;
global file;
global line ;
set f [open $file w];
for {set i 0} {$i < $n} {incr i} {puts $f $line($i)};
close $f;
}
proc scroll {str} {
global n;
global line;
for {set i 1} {$i < $n} {incr i} {set line([expr $i - 1]) $line($i)};
set line([expr $n - 1]) $str;
}
foreach {n file} $argv {}
for {set i 0} {$i < $n} {incr i} {set line($i) ""}
while {1} {
scroll [gets stdin];
outem;
}
________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm