Révision 8550e097
Ajouté par Julien Enselme il y a plus de 9 ans
bin/flush-files.sh | ||
---|---|---|
21 | 21 |
ls | head "-${number_of_backups_to_delete}" | xargs rm |
22 | 22 |
else |
23 | 23 |
if [ ! -z "$2" ] ; then |
24 |
dir="$(pwd)"
|
|
24 |
dir=$(pwd)
|
|
25 | 25 |
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" |
26 | 26 |
fi |
27 | 27 |
fi |
Formats disponibles : Unified diff
Command subsitution are not quoted. Quotes posed problems in loop.