Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Computer Engineering Expert

1 Part I

1.1

How could you carry out a floating point comparison? You must include two exs, one in C-shell and one in Bourne shell.

1.2

Describe the getopts command and prepare the sample shell script which uses getopts.

2 Part II :Bourne Shell

You must prepare the following problems in Bourne shell and design appropriate functions for each of them.

2.1

prepare the alarm clock script which sleeps for a number of seconds and then beeps and displays a message after that times has elapsed. The number of seconds is set based on an input argument.

2.2

Use a recursive function to print each argument passed to the function, regardless of how many arguments are passed. You are allowed to echo only first positional argument (echo $1).

1165_html file.jpg

2.3

prepare the Bourne shell script which create the HTML file. This file must have a table of 4 columns and n rows. The table’s elements are the contents of a directory. Directory names are written in blue and ordinary file names are written in green.

mars% ˜/htmgen2 > myhtml.html

The above command line creates an html file myhtml.html and this file is shown in above figure.

2.4

prepare the Bourne shell program which displays the following menu to the user:

Would you like to:

1. Look someone up
2. Add someone to the phone book
3. Remove someone form the phone book
4. Quit

Please choose one of the above (1-4):

For option 3, if multiple entries are found, then program would prompt the user for the entry to be removed:

More than one match, please choose the one to remove:

AAA Brown Remove[y or n]: y
AAA Blue Remove[y or no]: n

Part 3 Bourne shell and C-Shell

You must prepare two scripts for each of the following problems: one in Bourne shell and one in C-Shell.

3.1

prepare a program called isyes which returns an exit status of 0 if its argument is ”yes” and 1  otherwise. For purpose of this exercise, consider y,yes, Yes, YES and Y to be valid ”yes” arguments.

3.2

prepare a program called counttime which prints number of hours and minutes that a user has been logged on to the system (suppose that this is less than 24 hours). The name of the user is an input argument.

3.3

prepare a Shell script that checks the validity of a userid that is passed as an input argument. If the userid is available on mars it would display the suitable message.

3.4

prepare the shell script which looks at the name on on the command line and responds with the output string Web page if the name ends with html or with htm and with the output string applet if the name ends with class

3.5

prepare a shell script which changes permissions of all the files in the present directories which ends with scpt so that they are executable by everyone.

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91982

Have any Question? 


Related Questions in Computer Engineering

Write a growsquareprinter program that constructs a

Write a GrowSquarePrinter program that constructs a Rectangle object square representing a square with top-left corner (100, 100) and side length 50, prints its location by calling System.out.println(square), applies the ...

Create at least two different ways of distributing turtles

Create at least two different ways of distributing turtles randomly across the screen. In one method, use only turtle motion commands such as forward , left , and right . In another method, use set or setxy . Create butt ...

In practice the short exponents e 3 17 and 216 1 are

In practice the short exponents e = 3, 17 and 216 +1 are widely used. 1. Why can't we use these three short exponents as values for the exponent d in applications where we want to accelerate decryption? 2. Suggest a mini ...

After the dhke alice and bob possess a mutual secret point

After the DHKE, Alice and Bob possess a mutual secret point R = (x,y). The modulus of the used elliptic curve is a 64-bit prime. Now, we want to derive a session key for a 128-bit block cipher. The session key is calcula ...

Build a weighted graph that models a map of the area where

Build a weighted graph that models a map of the area where you live. Use Dijkstra's algorithm to determine the shortest path from a starting vertex to the last vertex.

Repeat exercise p87 using multiple classes modify the

Repeat Exercise P8.7, using multiple classes. Modify the GradeBook class so that it collects objects of type Student. Each such object should have a list of scores. Exercise P8.7 Modify the grade book application of How ...

Do the same as in exercise 114 but for a hash table of size

Do the same as in Exercise 11.4 but for a hash table of size 2031 that contains 999 keys. Exercise 11.4: Consider a hash table of size 501 that contains 85 keys. (a) What is the load factor? (b) What is the average numbe ...

Enhancement of a low-contrast image take a 25cent coin scan

(Enhancement of a low-contrast image) Take a 25¢ coin; scan and digitize it to obtain a 512 x 512 image. a. Enhance it by a suitable contrast stretching transformation and compare it with histogram equalization. b. Perfo ...

Do a complete research and reading in order to understand

Do a complete research and reading in order to understand how multimegawatt induction generators can be controlled with a scalar control. Assume power electronic devices capable of handling high voltages and high current ...

As the example of copacobana 105 shows key-search machines

As the example of COPACOBANA [105] shows, key-search machines need not be prohibitive from a monetary point of view. We now consider a simple bruteforce attack on DES which runs on COPACOBANA. 1. Compute the runtime of a ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen