You could use the little remote script below.
Having the script loaded, type "/logstrip" to open the file selection prompt.
alias logstrip {
noop $$msfile($logdir $+ *.log,Selct file(s) to strip (you may select multiple files))
if ($msfile(0) > 0) {
var %fn = 1
while ($msfile(%fn)) {
var %lines = $lines($v1), %ln = 1, %in = $qt($v1), %out = $qt($v1 $+ .temp)
.fopen ls.in %in | .fopen -o ls.out %out
if ($ferr) {
.fclose ls.in | .fclose ls.out
echo -sg * Aborted (Error: $v1 $+ )
return
}
while (%ln <= %lines) {
.fwrite ls.out $strip($fread(ls.in)) $+ $crlf
inc %ln
}
.fclose ls.in | .fclose ls.out
.remove %in | .rename %out %in
inc %fn
}
echo -sg * Done (stripped $msfile(0) logfiles)
}
}
Note that I did not test the script thoroughly - I suggest to backup your original files, or do a "test run" on some copies...
