-
Due Tuesday 1/26 midnight.
-
Follow the link in Canvas to set up your HW2 repository.
-
git clone
your repository to your laptop. -
Read the instructions (assignment_02.md) in your text editor or through GitHub.
-
Work through the problem, check in your changes into your repository (
git add
,git commit
), andgit push
your changes to the remote repository on GitHub.
Tests and Autograding: You can check that your answer is correct by running the following command from the top of your working directory:
pytest
These tests are also ran automatically as soon as you push changes to GitHub. Open "pull request 1" (the Feedback pull request) in your repository on GitHub to see results.
Work through the Copy, rename, delete:
Activity
but work with the PHY494 directory in this repository, i.e, you
will work under hw02-USERNAME/PHY494
where USERNAME is your GitHub
username. Some files and directories under PHY494
are already
present in the hw02 repository.
To be clear, all steps that are needed to complete the homework are shown here:
-
Make a backup (call it
TODO.bak
) of theTODO
list with thecp
command (in the same directory as the originalTODO
file). -
Rename
TODO
toTODO.txt
with themv
command. -
Make a directory
notes
under thedata
directory: You should now have a directory tree similar tohw02-USERNAME/PHY494/01_shell/ Documents/ work/ TODO.txt TODO.bak data/ notes/
Check with
ls -R
. -
Put a copy of
TODO.txt
into thenotes
directory (usingcp
). -
Create a new text file
data/notes/hints.txt
and write any hints for possible rebel bases into this file. -
Open
notes/TODO.txt
in your editor (e.g.,atom
) and add a note to item 1 too look in the hints.txt file. Save and exit. -
Make a copy of your
notes
directory in yourDocuments/work
directory:hw02-USERNAME/PHY494/01_shell/ Documents/ work/ TODO.txt TODO.bak notes/ TODO.txt hints.txt data/ notes/ TODO.txt hints.txt
-
Remove
data/notes/hints.txt
withrm
. -
Remove
data/notes
withrmdir
. (Hint: Read the error message!) -
Move
work/notes/hints.txt
into thework
directory. -
Remove the useless
work/notes
directory withrm -r
(careful !)
After you completed the activity you should end up with a specific
directory structure under ./hw02-USERBAME/PHY494/01_shell
, which will be
tested.
(Skim)read Neal Stephenson’s In the Beginning... was the Command Line from 1999 (PDF). What are the advantages and disadvantages of using the command line instead of a graphical user interface?