#!/usr/bin/env bash
# Prints each line specified by the arguments with its line number
# eg.
# $ Mapping.sh 1 2
# 1 Winter
# 2 Summer
# https://gist.github.com/akrasic/380bda362e0420be08709152c91ca1f9
# set -e option instructs bash to immediately exit if any command [1] has a non-zero exit status
# set -x enables a mode of the shell where all executed commands are printed to the terminal.
# set -u affects variables. When set, a reference to any variable you haven't previously defined - with the exceptions of * and @ - is an error, and causes the program to immediately exit
# set -o pipefail this setting prevents errors in a pipeline from being masked
set -euo pipefail
# Download the Prompts.txt in ./Prompts.txt
curl https://codeberg.org/BlastboomStrice/PrioritiesGame/raw/branch/main/Prompts.txt -o Prompts.txt
# We can use "@" variable to access every parameter passed to the script via the command line. It is a special variable that holds the array of variables in BASH.
for i in "$@"
do
# Prints the i-th line of Prompts.txt
# echo prints text
# The -E option in echo disables the use of backslash escapes, which is the default behavior.
# sed -n "$i"p
# p: prints the addressed line(s)
# "$i"p: prints the i-th line
# -n, --quiet, --silent: suppress automatic printing of pattern space
# sed -n "$i"p ./Prompts.txt prints the i-th line from Prompts.txt
echo -E " $i $(sed -n "$i"p ./Prompts.txt)"
done
# exit program
exit 0
Summer
Winter
Autumn
Spring
Rain
Sunny day
Windy day
Thunderstorm
Cloudy day
Nap
Good sleep
Insomnia
Potato
Reading a book
Watching movie/series
Watching brain-rot
Ice-cream
Pizza
House cleaning
Decluttering
Tidying up your room
Hierarchic authority
Police
Justice
Peace
Stability
Money
Friends
Romantic love
Studying
Catching a cold
Exercising
Weight-lifting
Dancing
Dancing alone
Singing alone
Singing
Yoga
Board games
Playing priorities games
Music lives
Living in the city
Living in the country fields
Living abroad
Vacations
Hobbies
Plumbing
Fighting for a better world
Heat death of the universe (liess)
Big Bang
Space-travel
Time-travel
Invisibility
Fire-bending
Water-bending
Air-bending
Earth-bending
Omnitrix
Shape-shifting
Ghosting
Becoming a ghost (temporary)
Becoming a ghost (permanently)
Vampires
Werewolves
Wizard
Sorcerer
Bard
Witch
Cats
Dogs
Sea-Lions
Bats
Drawing
Biking
Running
Repairing
Gossip
Babiess
Living alone
Living with parent(s)
Living with friend(s)
Living with partner(s)
Road-trip
Bermuda triangle
Moon
Sun
Sea
Mountain
Thinking
World domination
Being famous
Equality
Party
Sleeping early
Waking up early
Leaving early from party
Public transport
Trains
System administration
Free time
Swimming
Flying
Parachuting
Circus
Theatre
Piracy
Metal music
Pop music
Hip hop music
Alt music
Rock music
Boring music
Bath
Crop tops
Dresses
T-Shirts
Weight-blanket
Arriving too early
Awkward silence
Tarnish clothes
Key stuck in lock
Corpos
Healthy community
Electric zap (non-deadly)
Role-playing
Going for a walk
Puter james
Cooperation