From 4a882e77dc7c521ac4bfd552fd220551ca47b9a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hrotk=C3=B3=20G=C3=A1bor?= Date: Sat, 7 Dec 2019 14:14:11 +0100 Subject: [PATCH] remove non numeric characters from snapshot id (#76) Snapper support enhanced --- 41_snapshots-btrfs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index 2a58e82..ce840a7 100755 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -300,6 +300,10 @@ snapshot_list() local entry="${entries[$i]}" for j in "${!snapper_ids[@]}"; do local snapper_id="${snapper_ids[$j]//[[:space:]]/}" + # remove other non numeric characters + snapper_id="${snapper_id//\*/}" + snapper_id="${snapper_id//\+/}" + snapper_id="${snapper_id//-/}" if [[ "$snapper_id" == "$id" ]]; then local snapper_type=$(trim "${snapper_types[$j]}") local snapper_description=$(trim "${snapper_descriptions[$j]}")