386BSD 0.1 development
[unix-history] / usr / othersrc / contrib / isode / compat / isologs.sh
CommitLineData
48435ab0
WJ
1: run this script through /bin/sh
2
3x=`fgrep logpath @(ETCDIR)isotailor 2>/dev/null | awk '{ print $2 }'`
4if [ "x$x" != x ]; then
5 cd $x
6else
7 cd @(LOGDIR)
8fi
9
10rm -f iso.*.log ros.*.log [0-9]*.log
11
12for A in [a-z]*.log
13do
14 x=2
15 while [ $x -gt 0 ];
16 do
17 y=`expr $x - 1`
18 mv $A-$y $A-$x >/dev/null 2>&1
19 x=$y
20 done
21
22 if [ ! -f $A ];
23 then
24 continue
25 fi
26
27 if [ -s $A ];
28 then
29 mv $A $A-0 >/dev/null 2>&1
30 fi
31
32 > $A
33 chmod 666 $A
34done
35
36exit 0