Ask Question, Ask an Expert


Ask Computer Engineering Expert

1 Part I


How could you carry out a floating point comparison? You must include two exs, one in C-shell and one in Bourne shell.


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.


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.


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


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.


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.


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.


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.


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.


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


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

Question 11 what is the difference between linear and

Question 1 1. What is the difference between linear and non-linear accident models? Why are non-linear accident models not used more often in workplace accident investigations? Your response must be at least 75 words in ...

1 if a tlb is implemented as a set-associative cache how

1. If a TLB is implemented as a set-associative cache, how would you recommend determining the TLB slots examined by map (context, addr) ? Why? 2. Explain how to construct the cache tags of a virtual-address cache so tha ...

Write a program that checks the spelling of all words in a

Write a program that checks the spelling of all words in a file. It should read each word of a file and check whether it is contained in a word list. A word list is available on most UNIX systems in the file /usr/dict/wo ...

1 how does technological obsolescence constitute a threat

1. How does technological obsolescence constitute a threat to information security? How can an organization protect against it? 2. Does the intellectual property owned by an organization usually have value? If so, how ca ...

1 does an snmp manager run a client snmp program or a

1. Does an SNMP manager run a client SNMP program or a server SNMP program? 2. Show how the textual name "" is numerically encoded in SMI. 3. Is it possible to have a textual name in SMI as ""? ...

For a network with about 150 people what network devices ie

For a network with about 150 people. What network devices (i.e router, switches, APs), security devices (i.e Firewall), network services (i.e DHCP, file, active directory) would you recommend using and why?

A noted computer security expert has said that without

A noted computer security expert has said that without integrity, no system can provide confidentiality. a. Do you agree? Justify your answer. b. Can a system provide integrity without confidentiality? Again, justify you ...

The web server on the dmz web server system renames

The Web server on the DMZ Web server system renames temporary files used to record transactions. The name has the form trns followed by the integer representation of the date and time, followed by one or more digits. Why ...

1 describe the critical characteristics of information how

1. Describe the critical characteristics of information. How are they used in the study of computer security? 2. Identify the six components of an information system. Which are most directly affected by the study of comp ...

1 list the devices that can be used in a wireless network

1. List the devices that can be used in a wireless network. How are they connected to form a wireless network? 2. Infrared devices exchange beams of light to communicate. Is this the method used in wireless communication ...

  • 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