From ca1780883734de04437b738ea52793ded627781a Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 22 Sep 2018 15:03:29 +0200 Subject: [PATCH] change: backup code style lines --- backup | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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)) -- 2.39.5