From: Bastian Dehn Date: Sat, 22 Sep 2018 13:03:29 +0000 (+0200) Subject: change: backup code style lines X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=ca1780883734de04437b738ea52793ded627781a;p=simple-backup.git change: backup code style lines --- diff --git a/backup b/backup index d319bf8..cd3b9e2 100755 --- a/backup +++ b/backup @@ -51,10 +51,8 @@ CreateBackupFolder() backDir="$(date +%Y-%m-%d)"_"$fullnum"_"$backname" done - tmpordner=$(find $backpath -maxdepth 1 -type d \ - -name "*_"$backname"" \ - | sort \ - | tail --lines=1) + tmpordner=$(find $backpath -maxdepth 1 -type d -name "*_"$backname"" \ + | sort | tail --lines=1) lastBackDir=${tmpordner##*/} } @@ -152,8 +150,7 @@ BackupOnlineVMs() BackupOfflineVMs() { - offlineVM=$(ssh $remoteLogin virsh list --all \ - | grep 'shut off' \ + offlineVM=$(ssh $remoteLogin virsh list --all | grep 'shut off' \ | awk '{print $2}') for VM in $offlineVM; do @@ -245,9 +242,7 @@ LoescheVerzeichnisse() CleanUpBackups() { - backupanzahl=$(ls --directory $backpath/*/ \ - | grep "_$backname" \ - | sort \ + backupanzahl=$(ls --directory $backpath/*/ | grep "_$backname" | sort \ | wc --lines) loeschanzahl=$(($backupanzahl - $wunschanzahl))