allanjude / zxfer

A continuation of development on zxfer, a popular script for managing ZFS snapshot replication
BSD 2-Clause "Simplified" License
123 stars 40 forks source link

improper grep #40

Open allanjude opened 6 years ago

allanjude commented 6 years ago

The grep command used like this:

    # since the snap was matched, let's not waste our time searching for 
# it again
    zfs_source_snaps=$(echo "$zfs_source_snaps" | grep -v "$src_snap")

should use -x

else, removing a snapshot named @foo1 from the list, will also remove @foo11 and likely cause problems