First go to:


http://www.rhymezone.com/shakespeare


Try a few phrases with Shakespeare!  (If don't know any, try to find some online.) How do you think this program works?


Then....

What is grep?


Part 1:


Go to the following websites, and read a little bit about grep and what it does:

http://www.opengroup.org/onlinepubs/9699919799/utilities/grep.html



http://www.panix.com/~elflord/unix/grep.html




Part 2:

1) Open a terminal window (if you do not how, please ask me).


2) At the command prompt type the following: ssh altair.oswego.edu


When prompted for a "yes" or "no" answer, type the following: yes


Finally, enter the password you used to initially log into the system.



3) At the command prompt, type "pico" (without the quotes). Pico is a very simple text editor that is easy to use. Quickly familiarize yourself with the commands, and then, type in the following text and BE SURE TO HIT THE ENTER KEY AFTER EACH LINE:


Alan Mathison Turing was an English mathematician, logician, cryptanalyst and computer scientist. He was influential in the development of computer science and providing a formalisation of the concept of the algorithm and computation with the Turing machine, playing a significant role in the creation of the modern computer.
During the Second World War, Turing worked for the Government Code and Cypher School at Bletchley Park, Britain's codebreaking centre. For a time he was head of Hut 8, the section responsible for German naval cryptanalysis. He devised a number of techniques for breaking German ciphers, including the method of the bombe, an electromechanical machine that could find settings for the Enigma machine.



BE SURE AND SAVE THE TEXT AND MAKE NOTE OF THE NAME YOU GAVE TO THE FILE!



Part 3: Use grep to find the location of the following words in the text that you saved:


Turing
He
her

If you need more instruction on how to use grep, go back to the links at the beginning of this lab.


Part 4:

Now, read a little more about grep AND read the section on egrep:


http://stts.se/egrep_for_linguists/egrep_for_linguists.html


Part 5:

1) Use egrep to find lines in the text that you saved that contain either "Alan" or "Enigma". (You might have to think a little bit about this....)


2) Use egrep to find lines in the text that you saved that contain words ending in "ing". (Note- there is a small "trick" to this!)