Projet

Général

Profil

Révision 683f57f9

Ajouté par Julien Enselme il y a plus de 10 ans

Uniformisation: from cmd to $(cmd).

Voir les différences:

bin/flush-files.sh
13 13

  
14 14
check_arguments $# 1 "$help"
15 15

  
16
backups_number=`ls | wc -l`
16
backups_number=$(ls | wc -l)
17 17
let "number_of_backups_to_delete = backups_number - $1" > /dev/null
18 18

  
19 19
if [ $number_of_backups_to_delete -gt 0 ] ; then
20 20
    ls | head -$number_of_backups_to_delete | xargs rm
21 21
else
22 22
    if [ ! -z $2 ] ; then
23
        dir=`pwd`
23
        dir=$(pwd)
24 24
        echo "There are not enough files in $dir to Flush it. Check if backup script works fine." | mail -s "[db] $dir has a backup problem" $2
25 25
    fi
26 26
fi

Formats disponibles : Unified diff