diff options
author | Erich Eckner <git@eckner.net> | 2019-10-19 21:24:28 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-10-19 21:24:28 +0200 |
commit | 3b94c7504d2b6927b081e3dd58e854a7a1224345 (patch) | |
tree | 58ca3633d1b04d09347765e7a534e5de0a3d762a /Inventur | |
parent | c04187f4f98eaa4485ae5154dde17c3ec5af3619 (diff) | |
download | Schraubendatenbank-3b94c7504d2b6927b081e3dd58e854a7a1224345.tar.xz |
Inventur: frag_aus_Tabelle_ab() repariert
Diffstat (limited to 'Inventur')
-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() { |