cse15l-lab-report

The Lab Report 4

Procedure

4. Log into ieng6

To do this I typed
ssh cs15lfa23ef@ieng6.ucsd.edu<enter>

image



5. Clone your fork of the repository from your Github account (using the SSH URL)


To do this I clicked the copy button in github for the ssh link.

image



I pasted the ssh link into the with git clone.
git clone git@github.com:weloniheu/lab7.git<enter>

image



6. Run the tests, demonstrating that they fail

To do this ls to make sure I had knew which was the bash file for lab7 and then ran with it with bash.
ls<enter> bash test.sh<enter>

image




7. Edit the code file to fix the failing test


To do this I first needed to enter the code which can be done with the program vim that we learned in class. I also remembered that I could use tab to finish the rest of existing files to quicken the process.
vim Lis<tab>.j<tab><enter>

image



To edit the text, while still in normal mode I pressed shift G to move to the end of the file and then k to move up towards the line that needed to be checked. <shiftG><k><k><k><k><k><k><l><l><l><l><l><l><l><l><l><l><l>
or
<movetoend><up><up><up><up><up><up><right><right><right><right><right><right><right><right><right><right><right>

once the cursor was where I wanted i pressed r and then “replaced” the ‘1’ in index1 to ‘2’ so that it becomes index2.

<r><enter><2><esc>

image



then I exited with the save and quit command

:wq<enter>

image



8. Run the tests, demonstrating that they now succeed


As I already ran the bash test.sh earlier I pressed up arrow to get there, however as I entered vim a number of times the numbers represent a higher amount if you look at the number$:. Also interesting enough vim ListExamples.java is considered different commands from vim ListExamples.java for the purposes of the shells list of previous commands, so I needed to press up twice to get back to my test.sh command from earlier.

<up_arrow><up_arrow><enter>

Ie vim ListExamples.java -> vim ListExamples.java -> bash test.sh

image



9. Commit and push the resulting change to your Github account (you can pick any commit message!)


To do this I first added the file with the git add command I then checked with git status to make sure it was in

git add Lis<tab><enter>
git status<enter>

image



Once I was certain it was added I did the commit modified command with git commit -m with “Bug Fixed”. Then checked with git status again.

git commit -m "Bug Fixed"<enter> git status<enter>

image



Finally sure it used the push command to add it to the github.

git push<enter>

image

image