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 how do you discover syntax errors how do you discover

1. How do you discover syntax errors? How do you discover logic errors? 2. Write three versions of the HelloPrinter.java program that have different compile-time errors. Write a version that has a run-time error.

1 assume object x has two simple variables an integer and

1. Assume object x has two simple variables: an integer and an IP address. What is the identifier for each variable? 2. Assume object x has only one table with two columns. What is the identifier for each column? 3. Assu ...

1 convert the following c function to the corresponding

1. Convert the following C function to the corresponding MIPS assembly procedure:  int count(int Model[], Color[], Year[], int n, intx,y,z) {   int res = 0;                 inti = 0;  for(i = 0; i != n; i++)              ...

Oop for computer science assignment specificationa small

OOP for Computer Science Assignment Specification A small village infant school wishes to computerise its pupil records and you are to write a menu-driven application for this in C++. The data relating to pupils will be ...

Security in the futurenbspnbspplease respond to the

"Security in the Future"  Please respond to the following: Based on what you've learned in this course, give your opinion on the current state of the security industry. Take a position on whether you believe that hackers ...

1 revise the racquetball simulation to take shutouts into

1. Revise the racquetball simulation to take shutouts into account. Your updated version should report for both players the number of wins, percentage of wins, number of shutouts, and percentage of wins that are shutouts ...

As the lead software engineer for a medium-sized hospital

As the lead software engineer for a medium-sized hospital, you have been asked to spearhead an effort to improve the tracking of Voice Over IP (VOIP) calls made within the hospital system. You have also been asked to beg ...

Metrics paperresearch the following topicmetricsreview nist

Metrics Paper Research the following topic: Metrics Review NIST SP 800-55 Rev. 1, Performance Measurement Guide for Information Security. Discuss measures you would be interested in finding the results, based on your hom ...

1 identify the specific requirements in the common criteria

1. Identify the specific requirements in the Common Criteria that describe a reference validation mechanism. 2. Use the Common Criteria to write security requirements for identifying the security functional and assurance ...

Using the floor plan of a building you are familiar with

Using the floor plan of a building you are familiar with, design an electronic monitoring plan that includes closed-circuit television, burglar alarms with appropriate sensors, fire detectors, and fire suppression and ph ...

  • 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