CSCI 211: Unix Lab
Homework 7
(Due March 28, 2016, 23:59:59PM)

Note: 
1.	You must rely on UNIX commands only to solve the problems. No manipulation on Windows is allowed (such as scrolling the PuTTY screen). 
2.	A line of commands involving pipe ('|') or with ';' is not considered a single command.
3.	You must perform the check-in and check-out operation for each problem as specified below. Without that, no credit will be given.

Before doing the homework:

Run the command "source /lab7/quiz/prep.sh" exactly once.

Before doing EACH problem:
Run the command "source /lab7/quiz/checkin.sh <n>" exactly once, where <n> is the problem number.

After doing EACH problem:
Run the command "source /lab7/quiz/checkout.sh <n>" exactly once, where <n> is the problem number. 

After finishing all the problems:
1.	Run the command "source /lab7/quiz/wrapup.sh" exactly once. 
2.	Submit this file with your answers.
Save this file as yourlastname_yourfirstname_Lab7.rtf and then submit online at http://www.networks.howard.edu/lij/courses/2016/211/

Problems:
(All the following operations need be done on the file named 'info'.)
Hint: Review regular expression previously learned first.
1.	Make the first 'mis' uppercase in every line, save the output to the file 'p1'.
Command used:

2.	Make the first 'mgt' lowercase in every line. Ignore the case for matching. Save the output to the file 'p2'.
Command used:

3.	Make the first 'mgt' lowercase in every line. Ignore the case for matching. Use '%' for delimiter.  Save the output to the file 'p3'.
Command used:

4.	Replace the second number in every line with the word 'bonus'. Save the output to the file 'p4'.
Command used:

5.	Do problem 1, 3 and 4 in one single command. Save the output to the file 'p5'.
Command used:

6.	Remove all the numbers in every line. Save the output to the file 'p6'.
Command used:

7.	Swap the first digit and the second one of the first number in every line. Save the output to the file 'p7'.
Command used:

8.	Swap the first digit and the third one of the first number in every line. Save the output to the file 'p8'.
Command used:

9.	Swap the first number and the second one in every line. Save the output to the file 'p9'.
Command used:

10.	In the second column of every line, swap the first word and the second word in the fourth to sixth line. The columns are separated by semicolon. Save the output to the file 'p10'.
Command used:

11.	Remove all the lines starting with 'mgt'. Ignore case. Save the output to the file 'p11'.
Command used:

12.	Insert the line "new record" before every line starting with 'mis'. Save the output to the file 'p12'.
Command used:

13.	Add the line "new record" after every line ending with a number. Save the output to the file 'p13'.
Command used:

14.	Replace every line containing 'th' with the line 'old record'. Save the output to the file 'p14'.
Command used: