Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

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

Have any Question?


Related Questions in Computer Engineering

Subject digital securityprovide an fidm authentication

Subject : Digital Security Provide an FIdM authentication system that you have used (being subjet to). Tell the name of the organizations acted as the IdP (Identity Provider) and SP (Service Provider)?

Question bullusing the spss software open the high school

Question: • Using the SPSS software, open the High School Longitudinal Study dataset (ATTACHED). • Based on the dataset you chose, construct a research question that can be answered with a Pearson correlation and bivaria ...

An oil company determines it costs 25000 to sink a test

An oil company determines it costs $25,000 to sink a test well, an oil hit yields a net revenue of $475,000($500,000 gross-$25,000costs), and a natural gas hit yields $125,000 net revenue ($150,000 gross-$25,000 costs). ...

Language is cgenerate a sparse vector class with operator

Language is C++ Generate a sparse vector class with * operator, such as Vector Vector::operator * (Vector& param) A multiplication (*) operators returns element-wise multiplication of two vectors in another vector. Given ...

Question it has been stated that the increase in adoption

Question : It has been stated that the increase in adoption of cloud computing is similar to the story of why companies moved to adopted the public electrical grid. What motivated companies to adopt the public electrical ...

Question pick a topic relevant to the information we have

Question: Pick a topic relevant to the information we have covered to date, including this week. It can cover information in Chapters 1,2,3, and 9, or any of the articles presented in the readings area. The format of you ...

The system development team at the xyz company is working

The system development team at the XYZ Company is working on developing a new customer order entry system. In the process of designing the new system, the team has identified the following data entity attributes: Invento ...

Are there more children diagnosed with autism spectrum

Are there more children diagnosed with Autism Spectrum Disorder (ASD) in states that have larger urban areas over states that are mostly rural? In the state of Pennsylvania, a fairly urban state, there are 245 eight year ...

Stuck in the mud is a popular dice game in uk the game uses

Stuck in the mud is a popular dice game in UK. The game uses five (5) 6-sided dice to play. The players play in turns. Choose one player to start the game. The player will roll all five (5) dice. If the player rolled any ...

A small sports club keeps information about its members and

A small sports club keeps information about its members and the fees they pay. The secretary wants to be able to record when members pay and print a report similar to that in the figure below. last n me - first_narne - p ...

  • 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

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As