commit a6030e42c8a9f2b4324d20a00e297f764cc9b9f5
parent c2db6ce2046b8cd347754789b7e3790edb9573b5
Author: Christoph Lohmann <20h@r-36.net>
Date: Sun, 19 Jan 2020 10:47:13 +0100
Add progress to rpmasssend.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bin/rpmasssend b/bin/rpmasssend
@@ -65,12 +65,15 @@ fi
for mid in $(rpids -m $folder -- "$@");
do
+ totalnum="$(wc -l "${addresses}" | cut -d' ' -f 1)"
+ nownum=0
cat "${addresses}" \
| while read -r address;
do
[ -z "${address}" ] && continue
- printf "Sending to: %s\n" "${address}"
+ nowum=$(($nownum + 1))
+ printf "Sending to (%d/%d): %s\n" "${nownum}" "${totalnum}" "${address}"
{
printf "To: %s\n" "${address}"
rpview -m $folder -r $mid | grep -v To: