CSCI 211: Unix Lab
Homework 6
(Due March 21, 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 /lab6/quiz/prep.sh" exactly once.

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

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

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

Problems:
All the following operations should be performed in the directory tree rooted at '~/lab6' unless specified otherwise.
1.	Show all the words misspelled in the file 'employee'.
Command used:
Words misspelled:

2.	Show the first 6 lines of the file 'long'.
Command used:
First 6 lines:

3.	Show the last 6 lines of the file 'long'.
Command used:
Last 6 lines:

4.	With pipe and two commands, use two different approaches to show the 177th to 181th character of the file 'long'.
Commands used for the first approach:
Commands used for the second approach:
The 177th to 181th character:

5.	Show the 2nd column of the last two lines in the file 'employee' with the default delimiter.
Command used:
The 2nd column of the last two lines:

6.	The program 'make_expr' can take a file with a column of numbers and convert them to an expression adding all the numbers together. Use that and the command line calculator to calculate non-interactively the average of the numbers in the last column of the file 'employee'. Provide 2 digits after the decimal point for the result. Hint: Leverage output redirection for file creation and increment.
Commands used:
The average:

7.	Create a new file named 'people'. Its content is the file 'employee' with its fourth column replaced by the numbers from the first n lines of the file 'long', where n is the number of lines in 'employee'.
Commands used:

8.	Show the available disk space under the "/home" directory.
Command used:
The available disk space under the "/home" directory:

9.	Show the total amount of disk space occupied by the "lab6" directory under your home directory.
Command used:
The total amount of disk space occupied:

10.	Find the path of the 'whatsup' program that you can run anywhere.
Command used:
The path: