From 71019bf806d063c0c92d423f1b67fe9638c5bbb9 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 16 Jan 2022 14:23:14 +0000 Subject: [PATCH] sekrit-rekey: change `for ... in $(cmd)` to `cmd | while read` --- utils/scripts/sekrit-rekey.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/scripts/sekrit-rekey.sh b/utils/scripts/sekrit-rekey.sh index a158453..8ac0a7e 100644 --- a/utils/scripts/sekrit-rekey.sh +++ b/utils/scripts/sekrit-rekey.sh @@ -1,6 +1,6 @@ #!/bin/sh # env -# Written in 2020 by Lucas +# Written in 2020,2022 by Lucas # CC0 1.0 Universal/Public domain - No rights reserved # # To the extent possible under law, the author(s) have dedicated all @@ -38,7 +38,7 @@ scratch=$(mktemp -tp "$newdir" .sekrit-scratch-XXXXXXXXXX) || err "failed to create scratch file" trap 'rm -fr -- "$scratch" "$newdir"' INT QUIT TERM -for entry in $(sekrit ls | grep -v ^DONE); do +sekrit ls | while read -r entry; do printf "%s... " "$entry" sekrit get "$entry" >|"$scratch" || err "failed to export entry $entry"