Skip to content

Instantly share code, notes, and snippets.

@oldkingcone
Last active April 3, 2018 02:05
Show Gist options
  • Save oldkingcone/f5030aad63399e9f25853692fffdfdcb to your computer and use it in GitHub Desktop.
Save oldkingcone/f5030aad63399e9f25853692fffdfdcb to your computer and use it in GitHub Desktop.
fun interactive bash script.
#! /bin/bash
# fun interactive bash script.
# copy this text into a text file.
# Two households, both alike in dignity,
# In fair Verona, where we lay our scene,
# From ancient grudge break to new mutiny,
# Where civil blood makes civil hands unclean.
# From forth the fatal loins of these two foes
# A pair of star-cross’d lovers take their life;
# Whole misadventured piteous overthrows
# Do with their death bury their parents’ strife.
# The fearful passage of their death-mark’d love,
# And the continuance of their parents’ rage,
# Which, but their children’s end, nought could remove,
# Is now the two hours’ traffic of our stage;
# The which if you with patient ears attend,
# What here shall miss, our toil shall strive to mend.
prologue="./prologue"
echo "[**] Script has begun, selected: "$prologue" as output file"
while true; do
read -p "Would you like to move the script? " decision
case $decision in
[Yy]* ) read -p "Where would you like it moved to with file name? " prologue2;cat $prologue > $prologue2;echo $prologue2;cat $prologue2;break;;
[Nn]* ) echo "Moving forward!";cat $prologue;break;;
* ) echo "I need to know where to move the script to.....";;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment