From 68d7ded2e34ca9a34055cbe43c4769a8fd6697d1 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 27 Feb 2018 11:57:31 +0100 Subject: passwort-tresor.in: print number of matches --- passwort-tresor.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'passwort-tresor.in') 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)" -- cgit v1.2.3