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

Matlabs fft command computes the dft of a vector x assuming

MATLAB's fft command computes the DFT of a vector x assuming that the first sample occurs at time n = 0. Given that X = fft(x) has already been computed, derive a method to correct X to reflect an arbitrary starting time ...

Create a simple model that includes some agents a rule for

Create a simple model that includes some agents, a rule for birth of agents (see hatch primitive) and a rule for death of agents (see die primitive). It is often useful to include a rule for agent movement. The agents ca ...

Implement a class quadraticequation whose constructor

Implement a class QuadraticEquation whose constructor receives the coefficients a, b, c of the quadratic equation ax 2 + bx + c = 0. Supply methods getSolution1 and getSolution2 that get the solutions, using the quadrati ...

Assignmentcreate a four slide powerpoint presentation in

Assignment Create a four slide PowerPoint presentation in which you: 1. Slide 1: Insert a title slide including your name, course, quarter, and professor's name. 2. Slide 2: Insert a picture of the person or of something ...

Discuss the impact of threaded binary tree on the tree

Discuss the impact of threaded binary tree on the tree traversal procedure. g. Obtain the optimal Huffman codes for the messages (M1,...,M7) with relative frequencies (q1,...,q7)=(4,5,7,8,10,12,20). Draw the decode tree ...

1 igs need dc-ac ac-dc and ac-ac converters describe one

1. IGs need dc-ac, ac-dc, and ac-ac converters. Describe one application, relevant for IG-based energy system, for each of those power conversions. 2. Where are dc-dc converters used in IG systems?

Network design for schoola network has to be designed for a

Network Design for Schoola network has to be designed for a school. There are100 computers in the school. And has 5 Labs each of them consisted of 31 computersThe users in the lab should belong to a single domain and rec ...

1 authentication using certi fi cates although considered

1. Authentication using certi fi cates, although considered safe, suffers from weaknesses. Discuss these weaknesses using speci fi c examples. 2. Kerberos and SSL are additional layers to enhance authentication. Detail h ...

1 at any moment a rip message may arrive at a router that

1. At any moment, a RIP message may arrive at a router that runs RIP as the routing protocol. Does it mean that the RIP process should be running all the time? 2. Why do you think RIP uses UDP instead of TCP? 3. We say t ...

For the module 5 capstone assignment you provided a roadmap

For the Module 5 capstone assignment, you provided a roadmap to help your organization "know its customer" better. Now, management needs your help in designing an operational BI dashboard that combines information from i ...

  • 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