OSSP CVS Repository

ossp - Difference in ossp-pkg/shtool/sh.rotate versions 1.5 and 1.6
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/shtool/sh.rotate 1.5 -> 1.6

--- sh.rotate    2003/02/11 13:00:50     1.5
+++ sh.rotate    2003/04/04 16:36:01     1.6
@@ -182,8 +182,9 @@
     #   optionally take logfile size into account
     if [ ".$opt_s" != . ]; then
         #   determine size of logfile
-        set -- `ls -l $ldir/$file | sed -e 's; -> .*$;;' -e 's;[        ][      ]*; ;g'`
-        n=`expr $# - 4`
+        set -- `/bin/ls -l "$ldir/$file" | sed -e "s;$ldir/$file;;" |\
+                sed -e 's; -> .*$;;' -e 's;[    ][      ]*; ;g'`
+        n=`expr $# - 3`
         eval "size=\`echo \${$n}\`"
 
         #   skip logfile if size is still too small

CVSTrac 2.0.1