Part-11 how can you perform a oating point comparison you

Assignment Help Computer Engineering
Reference no: EM13347740

Part-1

1. How can you perform a ?oating point comparison? You should include two examples, one in C-shell and one in Bourne shell.

2 Explain the getopts command and write a sample shell script that uses getopts.

Part-2 Bourne Shell

1. You should write the following questions in Bourne shell and design suitable functions for each of them.

-  Write an alarm clock script that 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.

- 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 the ?rst positional argument (echo $1).

2. Write a Bourne shell script that create an HTML ?le. This ?le should 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 ?le names are written in green.

The above command line creates an html ?le myhtml.html and this ?le is shown in ?gure 1.

3. Write a Bourne shell program that 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 select one of the above (1-4):

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

More than one match, please select 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 should write two scripts for each of the following questions: one in Bourne shell and one in C-Shell.

1 Write a program called isyes that 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.

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

3 Write 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 will display the appropriate message.

4 Write a shell script that 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

5 Write a shell script that changes the permissions of all the ?les in the current directories that ends with scpt so that they are executable by everyone.

Reference no: EM13347740

Questions Cloud

Problem 1 investing in the stock marketjohnson and johnson : problem 1. investing in the stock marketjohnson and johnson jnj is trading at 68.15. jnj is a large health care
Project nbspintroductionthe public bicycle scheme loris : project nbspintroductionthe public bicycle scheme loris bikes was launched in 2010 in the city of istanbul. there are
Write two programsbull the first program will encipher a : write two programs.bull the first program will encipher a message using a keywordbull the second program will decipher
1 create the following adtsa write the constructor function : 1. create the following adts.a write the constructor function makestk predicate function emptystk and mutator functions
Part-11 how can you perform a oating point comparison you : part-11. how can you perform a ?oating point comparison? you should include two examples one in c-shell and one in
Net salvage valueallen air lines have to liquidate some : net salvage valueallen air lines have to liquidate some equipment that is being replaced. the equipment originally cost
Mergers and acquisitions play a critical part in a : mergers and acquisitions play a critical part in a corporations survival growth and profit strategies.nbsp various
A given a description of a new business new product service : a. given a description of a new business new product service or project develop present and defend the budget.b.
Software is required for a simple house burglar alarm : software is required for a simple house burglar alarm system.house burglar alarm specificationa house has two rooms

Reviews

Write a Review

Computer Engineering Questions & Answers

  What is the effective access time in ns needed

assume the cache hit ratio is 0.8 and the main memory hit ratio is 0.7. What is the effective access time in ns required to access a referenced word on this system.

  Express about choosing which server-side scripting language

You've been hired by Company X to create a web site which will include a data-driven component. Describe how you would go about choosing which server-side scripting language

  What mips instruction will be executed

In a von Neumann architecture, groups of bits have no intrinsic meanings by themselves. What a bit pattern represents depends entirely on how it is used. Consider the following bit patterns expressed in hexadecimal notation.

  Cost estimate may be made from the plan

Discuss in detail what they should do and grow a step-by-step plan for them. Make sure you reference your statements, not just a list of sources at the bottom of your post. When you post, make sure you state both "what" should be done as well as t..

  Estimating the output

Provided: enum cropType {WHEAT,CORN,RYE,BARLEY,OATS} cropType crop;

  Which command would you use to take advantage of a drive

Which command would place a level 3 dump of the /var filesystem immediately after the level 0 dump on the tape?

  How to identify a task you perform regularly

define the architectural differences between the object-oriented and structured designs. Which of the designs makes more sense to you? Why?

  Find the difference between a blog and a wiki

Explains what blogs are and how they could be used in a business environment. Give two examples of how a business might use blogs. What is the difference between a blog and a wiki.

  Discuss the relationship between healthcare quality and cost

Discuss the relationship between healthcare quality, access, and costs and how these three influence one another in our healthcare system. Also, identify factors in our system that may have an impact on these concepts.

  How many rtts would take this tcp connection to transmit

How many RTTs would take this connection to transmit a 100-packet sized file, just by using TCP AIMD mechanism, when no packets are lost during the transfer? (Assume slow-start is not used)

  What is the aim of a disaster recovery plan

What are the five methods of testing a DRP.What is the aim of a Disaster Recovery Plan.

  Modify the test scores program

Also print a report of the each student's test grades, average and final grade as a table, and then print the averages of each Test and overall Test Average, as well as highest Test Grade of all Tests and the student with thehighest class grade.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd