summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-02-27 11:57:31 +0100
committerErich Eckner <git@eckner.net>2018-02-27 11:57:31 +0100
commit68d7ded2e34ca9a34055cbe43c4769a8fd6697d1 (patch)
tree1c968ca167b7fc717affb80c3e1ba4bb25cc8c4c
parent9d3cd285f3375daae4c806036bc3e166dc6c1dbf (diff)
downloadpasswort-tresor-68d7ded2e34ca9a34055cbe43c4769a8fd6697d1.tar.xz
passwort-tresor.in: print number of matches
-rw-r--r--passwort-tresor.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/passwort-tresor.in b/passwort-tresor.in
index f2bc20a..32a3282 100644
--- a/passwort-tresor.in
+++ b/passwort-tresor.in
@@ -207,12 +207,14 @@ then
do
count=$(grep -c "${suchStr}" "${tmpDir}/output")
[ "${count}" -eq 1 ] && break
+ >&2 printf '"%s": %s\n' "${suchStr}" "${count}"
done
[ "${count}" -eq 1 ] && break
done
if [ "${count}" -ne 1 ]
then
>&2 printf '"%s" ist nicht genau ein Mal vorhanden!\n' "${suche}"
+ read -s
beenden 1
fi
output="$(grep -2 "${suchStr}" "${tmpDir}/output" | tail -n2)"