Week One

Here you will find the instruction materials for the first week of class.

Lecture slides for Week One:

LectureOne1.17.2012.pdf

Cheat Sheet of commands:

Wk1_CheatSheet.pdf

If you are a Google Drive user, the links are as follows:

Lecture One

CheatSheet

For our bonus exercise, here are your files:

Class1.tar.gz

The instructions are as follows:

Copy all the tree files to home 
Remove all the tree file in home
Concatenate all the tree files in a file called trees.txt in home 
How many trees are in this file? 
The second tree is unrooted and has node labels.  Make a new file with just the second tree from each of the tree files called trees2.txt 

The answers are as follows (highlight to view):

Copy all the tree files to home (cp tree*/tree*.txt .)

Remove all the tree file in home (rm tree*.txt)
Concatenate all the tree files in a file called trees.txt in home (cat tree*/tree*.txt >> trees.txt)
How many trees are in this file? (grep ";" trees.txt | wc -l)
The second tree is unrooted and has node labels.  Make a new file with just the second tree from each of the tree files called trees2.txt (tail -n 1 tree*/tree*.txt >> trees2)

FAQ from class today:

“How do I get out of man?”
-Get out of man by typing q
“When I’m using wildcard, is Unix case sensitive?”
-Unix is case-sensitive
“Where is pipe?”
-The pipe | symbol is found above your enter/return key. Hold down shift while pressing this key to get the pipe.
“Can we use grep to exclude lines? Like, print every line that does not have that text?”
-The -v flag gets every line except the grep text
“How can I rename a file?”
-mv file1 file2 will move file1 to be file2. file1 will no longer exist, and you will only have file2.

Also, if you'd like to learn a little more about programming, here are some recommended resources: