After Hours/Homework
Star Wars, the Command Line, and The Battle for the Fate of the Universe
Working in the command line is a key skill to develop as a programmer. It's a big break from what you're used to, and practice makes (eventually) perfect(ish). Let's explore the Star Wars narrative using the command line.
Note: Each file (not directory/folder) you create should be a text file. This means the file will end with the extension of *.txt
. For example: jimbo_jones.txt
"A New Hope"
Act I
- In the homework repository, inside
week1/001_star_wars_cli
, create a directory named after yourself and within it create a folder calledstar_wars
- In your
star_wars
folder, create two new directories:empire
andrebellion
. - Inside the
empire
directory, create a .txt file calleddarth_vader
- Use the force(or your knowledge of the command line) to add the text "...heavy breathing..." to the
darth_vader
file. (Don't remember how to do this? Use the 'other force', known as Google or Stack Overflow) - Inside the empire directory, create a .txt file called
emperor_palpatine
. - Inside the empire directory, create a directory called
death_star
- Move
darth_vader
into thedeath_star
Act II
- Move back to your
star_wars
directory, and enter therebellion
directory - Create a file called
princess_leia
and add the text 'Help me, Obi-Wan...You're my only hope.' - Create a file called
obi_wan
- Create a file called
luke_skywalker
- Create a directory called
millenium_falcon
- Inside the
millenium_falcon
, create two files:han_solo
andchewy
- Move
luke_skywalker
,obi-wan
, andprincess_leia
into themillenium_falcon
- Move the
millenium_falcon
into thedeath_star
Act III
- Unload the Millenium Falcon! Move the whole crew from the
millenium_falcon
directory into thedeath_star
directory - Darth_vader has defeated obi_wan! Delete poor
obi_wan
- Our heroes have disabled the tractor beam! Move the whole crew back into the millenium_falcon!
- Move the
millenium_falcon
back into therebellion
directory - darth_vader leaves the death_star to pursue Luke! Move him from the death_star into the empire directory!
- Thanks to his practice back home at Beggar's Canyon, Luke blew up the death star! Remove it from the galaxy!
- You win!