Ask Question, Ask an Expert


Ask Computer Engineering Expert

1 Part I


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


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.


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.


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


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.


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.


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.


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.


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.


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


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

What is the importance of the order of tables in an sql

What is the importance of the order of tables in an SQL statement that uses FOR XML? When would you use FOR XML EXPLICIT? Explain, in your own words, why SQL with FOR XML cannot be used to construct an XML document havin ...

Consider the cd cover in figure 5-61a specify identifiers

Consider the CD cover in Figure 5-61. A. Specify identifiers and attributes for the entities CD, ARTIST, ROLE, and SONG. B. Construct a crow's foot model showing relationships among these four entities. Name each relatio ...

Use a cad software program to make a complete set of

Use a CAD software program to make a complete set of production drawings for the electronic circuit shown in Figure 23.27. Design a double-sided board and use vendor catalogs to research the components. You will need to ...

Write a paper about importance of database driven websites

Write a Paper about Importance of database driven websites and its risks Research Paper: Pick an online ecommerce case study and write a report with your views on the website, case study reflects the goal on the current ...

In order for macarthur and associates to continue to grow

In order for MacArthur and Associates to continue to grow, they must consider the technology necessary within their workplace. They are considering sending managers to school for a graduate level degree and they are cons ...

Discuss with your class the key factors for future

Discuss with your class the key factors for future competitive success. List the common types of key success factors and answer the following questions:  On what basis do buyers of the industry's product choose between t ...

One might expect that we could estimate the jaccard

One might expect that we could estimate the Jaccard similarity of columns without using all possible permutations of rows. For example, we could only allow cyclic permutations; i.e., start at a randomly chosen row r, whi ...

The assembly-language instructions of fig 318 operate on

The assembly-language instructions of Fig. 3.18 operate on integers. Show that the operations AND, OR, and NOT can be realized on Boolean variables with these instructions. Show also that these operations on vectors can ...

Research other elements of a data center besides the core

Research other elements of a data center besides the core elements discussed in this chapter, including environmental control parameters such as HVAC (heat, ventilation, and air-condition), power supplies, and security.

A good consultantyou are the executive director of hr for

A good consultant You are the Executive Director of HR for Consulting Associates. Recently, David O'Rouke was employed through the Brisbane office of the firm to provide change management advice to the company's clients ...

  • 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

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate