diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2015-12-26 18:28:34 +0100 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2015-12-26 18:28:34 +0100 |
| commit | 03c571e99e9cf34419d603e5b6e8a982430caeb2 (patch) | |
| tree | a3683daaec2c55fcee0d818a379df95393e665f2 | |
| parent | cd769a1d45c9ef4d71551c9087a24aff85bfbdfa (diff) | |
| download | zfs-backup-03c571e99e9cf34419d603e5b6e8a982430caeb2.tar.gz zfs-backup-03c571e99e9cf34419d603e5b6e8a982430caeb2.tar.bz2 | |
workaround old bashism by a new bashism
| -rwxr-xr-x | zb-pull | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -24,11 +24,7 @@ local_zfs="$3" newest="N/A" newest_common="N/A" -ssh $ssh_remote "zfs list -t snapshot -r -d 1 -H \"${remote_zfs}\" " | awk '{print $1;}' | while read l ; do - #link unix timestamps - unixtime=`timestamp "$l"` || continue - echo "$unixtime" "$l" -done | sort -n | while read l ; do +while read l ; do fullname=${l#* } snapname=${fullname#*@zb-} @@ -37,7 +33,12 @@ done | sort -n | while read l ; do if zfs list -t snapshot -H "${local_zfs}@zb-${snapname}" ; then newest_common="$snapname" fi >/dev/null 2>/dev/null -done +done < <( +ssh $ssh_remote "zfs list -t snapshot -r -d 1 -H \"${remote_zfs}\" " | awk '{print $1;}' | while read l ; do + #link unix timestamps + unixtime=`timestamp "$l"` || continue + echo "$unixtime" "$l" +done | sort -n ) # some checks |
