diff options
-rwxr-xr-x | Inventur | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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() { |