CSC3320 Test 1 Solved

30.00 $

Category:

Description

Rate this product
  1. Pick any of your 10 favourite unix commands. For each command run the man command and copy the text that is printed into a mandatabase.txt. Write a shell script helpme.sh that will ask the user to type in a command and then print the manual’s text associated with that corresponding command. If the command the user types is not in the database then the script must print

    sorry, I cannot help you

  2.  On your computer open your favourite Wikipedia page. Copy the text from that page into a text file myexamfile.txt and then copy that file to a directory named midterm (use mkdir to create the directory if it doesn’t exist) in your snowball server home directory (use any FTP tool such as Putty or Filezilla to copy the file from your computer to the remote snowball server machine: see Lab 6).
  1. Write a shell script that will find the number of statements in the text. A statement is defined as the collection of text between two periods (full-stops).
  2. Update the script to present a tabular list that shows the number of words and number of letters in each statement.
  1.  Design a calculator using a shell script using regular expressions. The calculator, at the minimum, must be able to process addition, subtraction, multiplication, division and modulo operations. It must also have cancel and clear features.
  2.  Build a phone-book utility that allows you to access and modify an alphabetical list of names, addresses and telephone

numbers. Use utilities such as awk and sed, to maintain and edit the file of phone-book information. The user (in this case, you) must be able to read, edit, and delete the phone book contents. The permissions for the phone book database must be such that it is inaccessible to anybody other than you (the user).

5. Give brief answers with examples, wherever relevant

  1. What is the use of a shell?
  2. Is there any difference between the shell that you see on

    your PC versus that you see on the snowball server upon login. If yes, what are they? Provide screenshots for examples.

C.What are the elements in a computer (software and hardware) that enable the understanding and interpretation of a C program?

  1. The “printf()” C command is used for printing anything on the screen. In bash we use the command “echo ”. What is the difference (if any) in terms of how the computer interprets and executes these commands?
  2. What do these shell commands do? “ssh”, “scp” and “wget”. Describe briefly using an example that you have executed using the snowball server.
  • Midterm_1-0ufqns.zip