Practicum - week 4






1.

Create a file in which you will put all your answers, and when you are done, send this file as an attachment to Mariette. Try using as less energy as possible when putting the solutions into this file. E.g. when the list of a directory is asked, use ls '>> filename'. When a command line is asked, go up with the cursor moving key, type 'echo' in the beginning of the line, and '>> filename' to the end of the line. (Don't forget, maybe you will need quotes in this case...!)

Before doing it for real, try it first out.
 
 

2.

To make your life easier, create a soft link in your home directory towards /users1/birot/Federalist/ .

Send to Marietta the command line, as well as the long list of your home directory containing this link. (1 point)
 
 

3.

Give the command line that always prints EXACTLY the following text to another screen:

                I still love you!  ... Do you also love me??? I want to take you to a ***** hotel!

(1 point)
 
 

4.

Now we will work again with the Federalist Papers.

Make an alphabetical word list out of the file dis49.txt. This should meet the following criteria:

Remark: when a punctuation mark appears after the word (such as "who," or "would," or "judgment.") shouldn't appear as a seperate entry. Avoid also listing numerals.

Send the command line and the end of this list (last 20-30 words) to Mariette. (2 points !!!)

(You may want to read through the example by Henny -- thus writen in Dutch --, in the Appendix of the 3rd week's lecture note.)
 

5.

Make a reverse alphabetical list: this is the same list, but putting words ordered in an "anti-lexicographical way". This means that when comparing to words, we take first their last letter, and if they are the same, we compare the penultimate one, etc. Thus "zebra" would appear in the beginning of the list, following "honda", and "almighty" at the end. The end of the list looks like:

necessary
February
very
every
inquiry
theory
carry
jealousy
society
stability
tranquillity
community
authority
security
diversity
ingenuity
party
pretty

Send the command line and the beginning of this list to Mariette. (1 point)
 
 

6.

Now get a reverse alphabetical list out of all the papers by John Jay. (1 point)
 
 
 

7.

Give a command line that selects all the lines out of its input that begin with a date given in a Dutch format (e.g. 25-09-02).  (1 point)

Try to avoid "impossible dates" as much as possible: e.g. 35-22-99 is not a possible date. What can you avoid, and what can't you? Why? Explain it to Mariette. (1 point)
 
 

8.

Under /users1/birot/Course/grades you will find the grades received by a (don't worry: fictive) class during the Tekstmanipulatie course. The grades are to be understood according to the Dutch system. Give a command line that returns:

- the people sorted according to their grade: 10 on the top, and 1 in the button (consult the online manual for all kind of options, if needed...) (1 point)

- the people who have failed, sorted according to their name (1 point)

Send the command lines, as well as the sorted lists to Mariette. (Included in the file containing all your answers.)