]> git.sesse.net Git - backup.sh/commitdiff
sort and tail now uses a slightly different syntax, as the old is deprecated in Etch
authorroot <empty>
Wed, 15 Aug 2007 14:39:42 +0000 (14:39 +0000)
committerroot <empty>
Wed, 15 Aug 2007 14:39:42 +0000 (14:39 +0000)
backup.sh

index cf2e24b31205389185aaf20edc6d11a15d29abd0..32bb5795e5aea179075e84b1b09ac0d9a18e8cef 100755 (executable)
--- a/backup.sh
+++ b/backup.sh
@@ -122,7 +122,7 @@ backup()
     touch -t $DATE ../.date
 
   #make a sortet filelist
-  grep -v ^d $DATE.idx | sort -n -r +2 > $DATE.sdx
+  grep -v ^d $DATE.idx | sort -n -r -k 2 > $DATE.sdx
 
   #fix perm
   chmod 600 *tgz                      #only for us
@@ -247,7 +247,7 @@ do
   fi
 
   #delete complete backups
-  for full in `ls -1t $storagedir/$computer/$sfilesystem/full/*tgz | tail +$mf`
+  for full in `ls -1t $storagedir/$computer/$sfilesystem/full/*tgz | tail -n +$mf`
   do
    prefix=`echo $full | sed "s/\.[^.]*$//"`
    echo `date`": $computer:$filesystem sletter full $prefix (for mange)" >&2