Write a dos-like shell on top of the bourne shell

Assignment Help Operating System
Reference no: EM131010751

COMP 340, Winter 2016

https://www.tomshardware.com/answers/id-2189277/basic-shell-script.html

Shell script programming

(I) Write a DOS-like shell on top of the Bourne shell to satisfy the DOS users. Your program is invoked by

% dos
/home/student/dharris/340/assgt2> _

and the familiar DOS prompt is displayed which shows the path of the current working directory. You shell supports the following DOS commands:

cd del ren more
copy files copy file1 file2
xcopy xcopy/s xcopy /s
deltree deltree/y deltree /y
dir dir/w dir /w
dir/p dir /p

If the user command does not match any of the supported DOS commands, you shell should still send it to unix for execution.

(II) Write 2 sh scripts

A. 'Makeusers' to create a bunch of user accounts on Linux. Reference to the Linux commands of adduser and useradd.
Suppose a list of usernames is supplied in an ascii file 'classlist'
as follows:
tongf
doej
billw

The script 'makeusers' will read the usernames from the file 'classlist' and create the 3 user accounts accordingly. You type % makeusers < classlist to run the scripts.

B. 'Purgeusers' to remove user accounts. Reference ot the Linux commands of userdel. The script 'purgeusers' will read the usernames from the file 'classlist' and remove the 3 user accounts and the corresponding dirs and files accordingly. You type % purgeusers < classlist to run the scripts.

* Submit programs well-documented. Late submission will be graded down by 10% for each day.

END.

Reference no: EM131010751

Questions Cloud

What should you do to prevent or mitigate such risks : Do you have ethical responsibilities to Sharon and Darryl? Explain. If there are ethical responsibilities, what are they? What should you do to prevent or mitigate such risks
Whether the metrics are well-balance and address financial : Explain the main priorities for evaluating and controlling a project related to project communication management. Describe how the organization can ensure they are using dashboards or communication methods effectively.
Draw a free-body diagram for the beam : A vaulter holds a 29.4-N pole in equilibrium by exerting an upward force U with her leading hand and a downward force D with her trailing hand, as shown in Figure P12.25. Point C is the center of gravity of the pole. What are the magnitudes of U a..
What are the long-term ramifications of practice : What are the long-term ramifications of practice, both on supply and demand in general - How should supply chain and logistics management respond to this practice long-term?
Write a dos-like shell on top of the bourne shell : Write a DOS-like shell on top of the Bourne shell to satisfy the DOS users -  Reference to the Linux commands of adduser and useradd.
Describe competency models : Describe competency models, case-based decision making, and systems thinking. Describe why the competencies of the past are not compatible with the competencies of the future for the global organization
What is the monthly cost of the tire : Tire Warranty for a Cooper tire is 12 months at a price per tire of $59.95. What is MONTHLY worth/cost of the tire if we consider annual interest rates are at 10%?
Evaluate various hrm theories and frameworks : Is this a case of poor ethical behaviour? Why/why not - As HR Manager, what would you done in this situation?
Calculate the marginal revenue and profit functions : Calculate the marginal revenue R'(x) and profit P'(x) functions. Compute the revenue and profit, and also the marginal revenue and profit, if you have produced and sold 500 copies of the latest edition.

Reviews

Write a Review

Operating System Questions & Answers

  Write a simple text formatting program in java

Prompt for the maximum formatted output width. The range is 30 to 100 characters.

  Create algorithm which prevents deadlock using one semaphore

Using exactly one semaphore, create an algorithm which prevents deadlock. Do not be concerned about starvation and inefficiency.

  Clear (place 0''s) in all memory locations from 2000h to 200a

Make every odd bit (bit 1,3,5 and 7) in memory addresses C000h and D000h a 0. Do not change any other bit at each address.

  Requirements model for aims project

Need help in finalizing the requirements model for Airlines Information Management System (AIMS) project. The requirements model require to include use case diagrams for the entire AIM system.

  Interactions with the systems

Think about a typical day in your life and discuss all the instances when your activities get recorded

  Network design question

Bench Fitness Centers has 8- i ndividual  locations in this area. Most of the centers have the similar equipment and provide the same services,

  Describe the sequence of events that lead to the computation

Describe the sequence of events (loading registers from memory, saving values in memory, and so on) that lead to the computation of x + y + z. How about (2x) + y?

  Pros and cons of using embedded uid and pw

Think about an embedded user id and password which provides me access to a client/server environment. Discuss the pros and cons of using an embedded uid and pw?

  Steps add to the check list

According to your personal experience, what steps would you add to the check list and determine what steps would you leave out?

  How many probes will be needed on average to enter a symbol

If that one is also full, another is used, and so on, until an empty is found. If the fraction of the slots that are full is R, how many probes will be needed, on the average, to enter a new symbol?

  Compute the net expected value for the project

You are considering to make modifications to an existing application. Compute the net expected value for the project risks and opportunities

  External and internal penetration testing

As a penetration tester, you are hired as a consultant by a small- to mid-sized business that is interested in calculating its overall security risk today, January 1, 2012.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd