summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xInventur12
1 files changed, 5 insertions, 7 deletions
diff --git a/Inventur b/Inventur
index 1864fea..a828a25 100755
--- a/Inventur
+++ b/Inventur
@@ -72,15 +72,13 @@ frag_aus_Tabelle_ab() {
printf ' FROM `%s`' "${Kategorien["$1"]}"
} \
| mysql -N --raw --batch \
- | tr '\t' ' ' \
- | sort -u
+ | sort -u \
+ | sort -k2,2
)
- Antwort=$(
- frag_ab "$1" $(printf '%s\n' "${Alternativen}" | sed 's@^\S\+ @@')
+ frag_ab "$1" $(printf '%s\n' "${Alternativen}" | sed 's@^\S\+\s@@') \
+ | join -1 1 -2 2 -o 2.1 - <(
+ printf '%s\n' "${Alternativen}"
)
- printf '%s\n' "${Alternativen}" \
- | grep -wF "${Antwort}" \
- | cut -d' ' -f1
}
zeige_Infos() {