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

While working with ms dos which command will you use to

While working with Ms Dos, which command will you use to transfer a specific file from one disk to another?

1 a cache designer wants to increase the size of a 4 kib

1. A cache designer wants to increase the size of a 4 KiB virtually indexed, physically tagged cache. Given the page size shown above, is it possible to make a 16 KiB direct-mapped cache, assuming 2 words per block? How ...

1nbspa methodology describes how things should be done

1:  A methodology describes how things should be done , design a table showing how you can map the main activities of " Hospital  Management Project  "into the knowledge areas ? Q 2: Using Microsoft Project 2007/2010 too ...

1 using the cidr notation show the ipv6 address compatible

1. Using the CIDR notation, show the IPv6 address compatible to the IPv4 address 129.6.12.34. 2. Using the CIDR notation, show the IPv6 address mapped to the IPv4 address 129.6.12.34. 3. Using the CIDR notation, show the ...

Respond to t he following questions in one essay at least

Respond to t he following questions in one essay. At least three to four paragraphs for each question with examples is expected. Describe the term performance booster(s) and how it relates to a Virtual Teams There are th ...

A polygon is a closed geometric shape consisting of three

A polygon is a closed geometric shape consisting of three or more line segments that are connected end to end. The endpoints of the line segments are known as vertices, which can be defined by points in the two-dimension ...

Repeat exercise p87 using multiple classes modify the

Repeat Exercise P8.7, using multiple classes. Modify the GradeBook class so that it collects objects of type Student. Each such object should have a list of scores. Exercise P8.7 Modify the grade book application of How ...

1 a tv channel has a bandwidth of 6 mhz if we send a

1. A TV channel has a bandwidth of 6 MHz. If we send a digital signal using one channel, what are the data rates if we use one harmonic, three harmonics, and five harmonics? 2. A signal travels from point A to point B. A ...

Systems programming assignmenttask 1now that the os has a

Systems Programming Assignment Task 1 Now that the OS has a keyboard driver, it is possible to produce a simple command processor. You should expand the Run() method in command.c to produce a simple command processor tha ...

Termites model run the termites model found in the biology

Termites model Run the Termites model (found in the Biology section of the NetLogo models library). In this model there are only two objects: termites and wood chips. What are the termites doing in this model? Without lo ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

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