Construct a rudimentary implementation of a shell

Assignment Help Computer Engineering
Reference no: EM13320972

Assignment

Construct a rudimentary implementation of a shell. This will require knowledge of everything that we've learned so far (string manipulation, memory model) as well as a solid understanding of a powerful Unix primitive: the process.

At its core, the shell is simply an overglorified infinite loop. On each iteration, it prints a prompt, reads a command (from stdin) and then carries out various actions based on the command received.

Prompt

The prompt has been provided for you. You are allowed to change it, so long as the beginning of the prompt consists of the shell's PID surrounded by stache tags.

Input

User input has also been taken care of for you. This is done using the getline() function. getline() is very powerful in that it is capable of reading in a buffer of arbitrary size and will allocate space accordingly. You have to make sure to free this space, however!

After input has been received, it must be tokenized on spaces so that you may effectively deal with the command.

Commands

There are two types of commands: builtins and non. Builtin commands are handled directly by the shell executable itself. Non-builtin commands must be handled by external executables.

The Files

You have been provided with shell.c which provides you with a rudimentary shell. It does not actually do anything other than loop and collect user input.

You do not need a header file in this assignment, although you certainly may provide one if you wish.

Reference no: EM13320972

Questions Cloud

Explain the concentration of the acetic acid in moles : A student was asked to determine the strength of the acetic acid in a vinegar solution. For 25.00 mL of vinegar he used 32.05 mL of a 0.4235M solution of sodium hydroxide to neutralize using phenolphthalein as indicator. What was the concentration..
Calculate the magnitude of the average forces : A 60 kg person jumps from rest off a 5 m high tower straight down into the water. Determine the magnitude of the average forces that the water exerts on the diver
Determine the angular acceleration of the merry-go-round : A merry-go-round starts from rest and reaches the angular speed of 4 rpm in the first two minutes. What would be the angular acceleration of the merry-go-round
Define what is the final concentration : 69.0 mL of a 1.30 M solution is diluted to a volume of 278 mL. A 139-mL portion of that solution is diluted using 151 mL of water. What is the final concentration
Construct a rudimentary implementation of a shell : Construct a rudimentary implementation of a shell. This will require knowledge of everything that we've learned so far (string manipulation, memory model) as well as a solid understanding of a powerful Unix primitive
Define description of the mechanism of the reaction : Which of the following terms would be used in a description of the mechanism of this reaction: a. tertiary carbanion b. 2-methylpentoxonium ion Torn between the two
Demand for text books : Is the demand for the following elastic, moderate elastic, highly elastic? Give reasons.Demand for petrol Demand for text books
Find the voltage drop across the capacitor : A 4.00-microF capacitor that is initially uncharged is connected in series with a 7.90-k ohm resistor and an emf source with E = 120 V and negligible internal resistance. what is the voltage drop across the capacitor
Environmentally speaking : Environmentally speaking

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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