fix(script): Output snapshots list with trailing line break so that 'wc -l' can better count them (#1)
This commit is contained in:
parent
12283e49c2
commit
2e0bb42372
@ -229,7 +229,7 @@ function get_snaps_in_cur_sev () {
|
|||||||
snap_list="$(zfs list -H -o 'name' -t snapshot "${dataset_to_query}")"
|
snap_list="$(zfs list -H -o 'name' -t snapshot "${dataset_to_query}")"
|
||||||
snaps_done_by_us="$(grep -Pi -- '@'"${snap_name_prefix}${snap_field_separator}" <<<"${snap_list}")"
|
snaps_done_by_us="$(grep -Pi -- '@'"${snap_name_prefix}${snap_field_separator}" <<<"${snap_list}")"
|
||||||
snaps_in_cur_sev="$(grep -Pi -- "${snap_field_separator}"'sev:'"${severity}${snap_field_separator}" <<<"${snaps_done_by_us}")"
|
snaps_in_cur_sev="$(grep -Pi -- "${snap_field_separator}"'sev:'"${severity}${snap_field_separator}" <<<"${snaps_done_by_us}")"
|
||||||
printf -- '%s' "${snaps_in_cur_sev}"
|
printf -- '%s\n' "${snaps_in_cur_sev}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function do_retention () {
|
function do_retention () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user