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

1 rewrite the longest common substring code as a class2

1. Rewrite the longest common substring code as a class. 2. Write a program that uses a brute-force technique to find the longest common substring. Use the Timing class to compare the brute-force method with the dynamic ...

1 run the binary search method on a set of unordered data

1. Run the binary search method on a set of unordered data. What happens? 2. Using the CArray class with the SeqSearch method and the BinSearch method, create an array of 1,000 random integers. Add a new private Integer ...

Write a function that accepts as arguments the following a

Write a function that accepts as arguments the following: A) An array of integers B) An integer that indicates the number of elements in the array The function should determine the mode of the array. That is, it should d ...

1 design and implement a function to find all negative

1. Design and implement a function to find all negative values within a given list. Your function should return a new list containing the negative values. When does the worst case occur and what is the run time for that ...

1 although we discussed several sources of security threats

1. Although we discussed several sources of security threats, we did not exhaust all. There are many such sources. Name and discuss five. 2. We pointed out that the design philosophy of the Internet infrastructure was pa ...

Given a large ordered array that may contain many elements

Given a large ordered array that may contain many elements that are multiply occurring (it may be assumed that on average when an element is multiply occurring it will occur many times). Devise an adaptive duplicate dele ...

We have sampled a low-pass signal with a bandwidth of 200

We have sampled a low-pass signal with a bandwidth of 200 KHz using 1024 levels of quantization. a. Calculate the bit rate of the digitized signal. b. Calculate the SNRdB for this signal. c. Calculate the PCM bandwidth o ...

Why are database management systems dbmss but really just

Why are database management systems (DBMSs, but really just asking about database technology) important in the business community? Can you provide an example of database technology in the business world?

1 list and describe the five vulnerability assessment

1. List and describe the five vulnerability assessment processes described in the text. Can you think of some other assessment processes that might exist? 2. What is digital forensics, and when is it used in a business s ...

1 show that the approximate diffusion equations derived for

1. Show that the approximate diffusion equations derived for a constant electric field, (750.3A) and (750.4A), are also valid if E is not spatially constant but the region is quasi-neutral. This enables a derivation 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