From 5cfbf46c8c0ae5f8c09560932bb49f3ae4d47596 Mon Sep 17 00:00:00 2001 From: Antynea Date: Sun, 7 Jan 2018 00:31:16 +0100 Subject: [PATCH] fix Snapper id too long #36 * fix Snapper id too long #36 --- 41_snapshots-btrfs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index 5e29579..f5b8432 100755 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -293,7 +293,7 @@ snapshot_list() for id in "${ids[@]}"; do for j in "${!snapper_ids[@]}"; do local snapper_id="${snapper_ids[$j]//[[:space:]]/}" - if [[ "$snapper_id" -eq "$id" ]]; then + if [[ "$snapper_id" == "$id" ]]; then local snapper_type=$(trim "${snapper_types[$j]}") local length="${#snapper_type}" [[ "$length" -gt "$max_type_length" ]] && max_type_length=$length @@ -306,7 +306,7 @@ snapshot_list() local entry="${entries[$i]}" for j in "${!snapper_ids[@]}"; do local snapper_id="${snapper_ids[$j]//[[:space:]]/}" - if [[ "$snapper_id" -eq "$id" ]]; then + if [[ "$snapper_id" == "$id" ]]; then local snapper_type=$(trim "${snapper_types[$j]}") local snapper_description=$(trim "${snapper_descriptions[$j]}") printf -v entry "%-${max_entry_length}s | %-${max_type_length}s | %s" "$entry" "$snapper_type" "$snapper_description"