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

For hash functions it is crucial to have a sufficiently

For hash functions it is crucial to have a sufficiently large number of output bits, with, e.g., 160 bits, in order to thwart attacks based on the birthday paradox. Why are much shorter output lengths of, e.g., 80 bits, ...

Create a simple structure using the information from your

Create a simple structure using the information from your book for help. Populate the structure. And print an example of one of the structure. Give example of the use of the dot operator.

What is the relationship between increased social

What is the relationship between increased social responsibility and IT at the workplace? Answer in about two paragraphs with reference. Must be 200-400 words and show an understanding and full development of the concept ...

Write a function that accepts as arguments the following a

Write a function that accepts as arguments the following: A) An array of integers B) An integer that indicates the number of elements in the array The function should determine the mode of the array. That is, it should d ...

Design and implement a word-searching algorithm that on

Design and implement a word-searching algorithm that on finding a mismatch with the current word simply reads characters to the start of the next word before attempting a match again.

Where the structured cabling standards are voluntary local

Where the structured cabling standards are voluntary, local codes have the force of law. If you were to prepare a guide for your employees concerning these codes, what would be in it?

Assume that our network may corrupt packets but it never

Assume that our network may corrupt packets, but it never loses or duplicates a packet. We are also concerned about flow control. We do not want the sender to overwhelm the receiver with packets. Design an FSM of a new p ...

1 what is the difference between a threat agent and a

1. What is the difference between a threat agent and a threat? 2. What is the difference between vulnerability and exposure? 3. How is infrastructure protection (assuring the security of utility services) related to info ...

1 study and suggest the best ways to defend the national

1. Study and suggest the best ways to defend the national critical infrastructure from potential attackers. 2. We indicated in the text that the best ways to manage security threats is to do an extensive risk assessment ...

Write a windows application that allows the user to explore

Write a Windows application that allows the user to explore the knapsack problem. The user should be able to change the capacity of the knapsack, the sizes of the items, and the values of the items. The user should also ...

  • 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