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

  Operation for circular linked list

Write down an algorithm or code segment for searching the circular linked list for a given item. Write down an algorithm or the code segment for locating nth successor of an item within a circular linked list (nth item which follows the given item ..

  Engineer using an automated monitoring system

auto mechanic with an automatic diagnostic system.a train engineer using an automated monitoring system.

  What personal information is collect by capps

What personal information is collect by CAPPS

  Determining the cpi of computer

A workstation utilizes a 15-MHZ processor with a claimed 10-MIPS rating to implement a provided programme mix. Suppose a one-cycle delay for every memory access. What is effective CPI of this computer?

  Write down a c program that has a declaration in main()

Modify this restaurant() function to alter the address in message. usage the expression *menu rather than *(menu + i) to retrieve the correct element.

  Utilize routers for connectivity devices instead of hubs

Utilize routers for connectivity devices instead of hubs

  Difference between clustered and nonclustered indexes

define the meaning of each of the transaction levels supported by SQL Server.

  Why would a firm choose one of these approaches

I am having difficulty with the following questions: Differentiate between a two-tier client/server system and a three-tier client/server system. Why would a firm select one of these approaches over the other when implementing a client/server syst..

  Program to compute the area and circumference of circle

Algorithm which will prompt for and receive the measurement of the diameter of a circle and compute and show the area and circumference of the circle.

  Explain what the database roles

Describe steps necessary to setup SQL Server security.

  What technology characteristics should be evaluated

explain how Web services can be used to effectively integrate business applications and data. Search the Web for resources on current Web services such as XML, SOAP, UDDI and WSDL. Discuss how each is used, including examples from industry.

  Potential vulnerabilities in purchasing with a debit card

Recognize any potential vulnerabilities in the act of forming a purchase along with a debit card.

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