Skip to content

Instantly share code, notes, and snippets.

@terceranexus6
Created September 11, 2016 09:13
Show Gist options
  • Save terceranexus6/a167d01b1353286c2cfbcf0dd81c1b01 to your computer and use it in GitHub Desktop.
Save terceranexus6/a167d01b1353286c2cfbcf0dd81c1b01 to your computer and use it in GitHub Desktop.
hamlet
#!/bin/bash
L1="'This brief, my lord."
L2="Nor I, my lord, in faith."
L21="We have sworn, my lord, already."
L3="I hear him coming: let's withdraw, my lord."
L4="Wilt please you go, my lord?"
L5="What, my lord?"
LINE="."
exit1="exit"
while [ "$LINE" != "$exit1" ]
do
read -p">> " LINE
if [ "$LINE" = "$L1" ]; then
echo "As woman's love."
fi
if [ "$LINE" = "$L5" ]; then
echo "Make you a wholesome answer; my vit's diseased:"
echo "but sir, such as I can make, you shall command; "
echo "or, rather as you say, my mother: "
echo "therefore no more, but to the matter: my mother you say"
fi
if [ "$LINE" = "$L4" ]; then
echo "I’ll be with you straight. Go a little before."
echo "How all occasions do inform against me,"
echo "And spur my dull revenge! What is a man,"
echo "If his chief good and market of his time"
echo "Be but to sleep and feed? a beast, no more."
echo "Sure, he that made us with such large discourse,"
echo "Looking before and after, gave us not"
echo "That capability and god-like reason"
echo "To fust in us unused. Now, whether it be"
echo "Bestial oblivion, or some craven scruple"
echo "Of thinking too precisely on the event,"
echo "A thought which, quarter'd, hath but one part wisdom"
echo "And ever three parts coward, I do not know"
echo "Why yet I live to say 'This thing's to do;"
echo "Sith I have cause and will and strength and means"
echo "To do't. Examples gross as earth exhort me:"
echo "Witness this army of such mass and charge"
echo "Led by a delicate and tender prince,"
echo "Whose spirit with divine ambition puff'd"
echo "Makes mouths at the invisible event,"
echo "Exposing what is mortal and unsure"
echo "To all that fortune, death and danger dare,"
echo "Even for an egg-shell. Rightly to be great"
echo "Is not to stir without great argument,"
echo "But greatly to find quarrel in a straw"
echo "When honour's at the stake. How stand I then,"
echo "That have a father kill'd, a mother stain'd,"
echo "Excitements of my reason and my blood,"
echo "And let all sleep? while, to my shame, I see"
echo "The imminent death of twenty thousand men,"
echo "That, for a fantasy and trick of fame,"
echo "Go to their graves like beds, fight for a plot"
echo "Whereon the numbers cannot try the cause,"
echo "Which is not tomb enough and continent"
echo "To hide the slain? O, from this time forth,"
echo "My thoughts be bloody, or be nothing worth!"
fi
if [ "$LINE" = "$L3" ]; then
echo "To be, or not to be, that is the question:"
echo "Whether 'tis Nobler in the mind to suffer"
echo "The Slings and Arrows of outrageous Fortune,"
echo "Or to take Arms against a Sea of troubles,"
echo "And by opposing end them: to die, to sleep"
echo "No more; and by a sleep, to say we end"
echo "The Heart-ache, and the thousand Natural shocks"
echo "That Flesh is heir to? 'Tis a consummation"
echo "Devoutly to be wished. To die, to sleep,"
echo "To sleep, perchance to Dream; aye, there's the rub,"
echo "For in that sleep of death, what dreams may come,"
echo "When we have shuffled off this mortal coil,"
echo "Must give us pause. There's the respect"
echo "That makes Calamity of so long life:"
echo "For who would bear the Whips and Scorns of time,"
echo "The Oppressor's wrong, the proud man's Contumely,"
echo "The pangs of despised Love, the Law’s delay, "
echo "The insolence of Office, and the Spurns"
echo "That patient merit of the unworthy takes,"
echo "When he himself might his Quietus make"
echo "With a bare Bodkin? Who would Fardels bear,"
echo "To grunt and sweat under a weary life,"
echo "But that the dread of something after death,"
echo "The undiscovered Country, from whose bourn"
echo "No Traveller returns, Puzzles the will,"
echo "And makes us rather bear those ills we have,"
echo "Than fly to others that we know not of."
echo "Thus Conscience does make Cowards of us all,"
echo "And thus the Native hue of Resolution"
echo "Is sicklied o'er, with the pale cast of Thought,"
echo "And enterprises of great pitch and moment, "
echo "With this regard their Currents turn awry, "
echo "And lose the name of Action. Soft you now,"
echo "The fair Ophelia? Nymph, in thy Orisons"
echo "Be all my sins remembered."
fi
if [ "$LINE" = "$L2" ]; then
echo "Upon my sword."
read -p">> " LINE
if [ "$LINE" = "$L21" ]; then
echo "Indeed, upon my sword, indeed."
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment