Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as Bash by registered user uwe ( 7 years ago )
#!/bin/bash

n=(Mario Gordon Clark Arthas Link)
p=(LL L M R RR)
e=(Suppe Pommes Knoblauchbrot Bruschetta Salat)
g=(Sprite Energydrink Fanta Cola Selters)
o=(Frankfurt Muenchen Berlin Koeln Hamburg)
a=(Autogramm Comic T-Shirt Lichtschwert Actionfigur)

for ln in ${n[@]}; do
    for lp in ${p[@]}; do
        for le in ${e[@]}; do
            for lg in ${g[@]}; do
                for lo in ${o[@]}; do
                    for la in ${a[@]}; do

#Auf einer Comic-Convention haben sich Mario, Gordon, Clark, Arthas und Link zum Essen getroffen.
#Alle Gäste saßen an einer langen Tafel nebeneinander.
#Sie hatten alle unterschiedliche Vorspeisen bestellt und Gordon hatte sich für Bruschetta entschieden.
if [ $ln == "Gordon" -a $le != "Bruschetta" ]; then continue; fi
if [ $ln != "Gordon" -a $le == "Bruschetta" ]; then continue; fi

#Mario saß ganz links neben der Person, die Suppe bestellt hatte.
if [ $ln == "Mario" -a $lp != "LL" ]; then continue; fi
if [ $ln != "Mario" -a $lp == "LL" ]; then continue; fi

if [ $lp == "L" -a $le != "Suppe" ]; then continue; fi
if [ $lp != "L" -a $le == "Suppe" ]; then continue; fi

#Der Gast mit einer Portion Knoblauchbrot saß links von einer Person, die Salat bevorzugte.
if [ $le == "Knoblauchbrot" -a $lp = "RR" ]; then continue; fi

#-/
# Auswertung

#Mario -- LL -- Knoblauchbrot -- Selters -- Berlin -- Comic
#Mario -- LL -- Knoblauchbrot -- Selters -- Berlin -- Lichtschwert
#Mario -- LL -- Knoblauchbrot -- Selters -- Hamburg -- Autogramm
#Clark -- R -- Knoblauchbrot -- Selters -- Berlin -- Actionfigur
#Arthas -- R -- Knoblauchbrot -- Selters -- Köln -- Comic
#Arthas -- R -- Knoblauchbrot -- Selters -- Köln -- T-Shirt
#Arthas -- R -- Knoblauchbrot -- Selters -- Köln -- Lichtschwert

#-> Salat nur entweder L oder RR (effektiv ist Salat damit auf RR, da es keinen auf L gibt)
if [ $le == "Salat" -a ! \( $lp == "L" -o $lp == "RR" \) ]; then continue; fi
#-> Salat auf RR -> Knoblauchbrot auf R
if [ $le == "Knoblauchbrot" -a $lp != "R" ]; then continue; fi
if [ $le != "Knoblauchbrot" -a $lp == "R" ]; then continue; fi

#Der Gast mit dem Teller Knoblauchbrot hatte sein Glas Selters verschüttet und der Gast aus München aß Pommes.
if [ $le == "Knoblauchbrot" -a $lg != "Selters" ]; then continue; fi
if [ $le != "Knoblauchbrot" -a $lg == "Selters" ]; then continue; fi

if [ $le == "Pommes" -a $lo != "Muenchen" ]; then continue; fi
if [ $le != "Pommes" -a $lo == "Muenchen" ]; then continue; fi

#Als einer der Gäste sein Lichtschwert vom Merchandise-Stand zeigte, sagte der Gast aus München neben ihm, dass sein Geschenk besser sei.
if [ $lo == "Muenchen" -a $la == "Lichtschwert" ]; then continue; fi

#Clark zeigte seine neue Actionfigur, woraufhin der Gast aus Hamburg lachte und sein Autogramm hervorholte.
if [ $ln == "Clark" -a $la != "Actionfigur" ]; then continue; fi
if [ $ln != "Clark" -a $la == "Actionfigur" ]; then continue; fi

if [ $lo == "Hamburg" -a $la != "Autogramm" ]; then continue; fi
if [ $lo != "Hamburg" -a $la == "Autogramm" ]; then continue; fi

#Jemand anderes hatte ein T-Shirt gekauft und als der Gast aus Berlin einen Platz weiter dieses sah, verschüttete er die Cola seines Nachbarn.
if [ $la == "T-Shirt" -a $lo = "Berlin" ]; then continue; fi
#if [ $lo == "Berlin" -a $lg == "Cola" ]; then continue; fi
#if [ $la == "T-Shirt" -a $lg == "Cola" ]; then continue; fi

#Link hob seine Fanta zu einem Trinkspruch an.
if [ $ln == "Link" -a $lg != "Fanta" ]; then continue; fi
if [ $ln != "Link" -a $lg == "Fanta" ]; then continue; fi

#Der Gast aus Frankfurt war vom Energydrink aufgekratzt und rempelte die Person in der Mitte an, so dass diese ihre Sprite verschüttete.
if [ $lo == "Frankfurt" -a $lg != "Energydrink" ]; then continue; fi
if [ $lo != "Frankfurt" -a $lg == "Energydrink" ]; then continue; fi

if [ $lo == "Frankfurt" -a $lp == "RR" ]; then continue; fi
if [ $lo == "Frankfurt" -a $lp == "LL" ]; then continue; fi

if [ $lp == "M" -a $lg != "Sprite" ]; then continue; fi
if [ $lp != "M" -a $lg == "Sprite" ]; then continue; fi

#Danach erzählte Arthas von seinem Alltag in Köln.
if [ $ln == "Arthas" -a $lo != "Koeln" ]; then continue; fi
if [ $ln != "Arthas" -a $lo == "Koeln" ]; then continue; fi

#Beim Aufräumen lag noch ein Comic herum, den wohl jemand vergessen hat.

echo $ln -- $lp -- $le -- $lg -- $lo -- $la | sed 's/Muenchen/München/;s/Koeln/Köln/'

                    done
                done
            done
        done
    done
done

 

Revise this Paste

Your Name: Code Language: