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

  Explain two types of computer attacks/ viruses

In order to limit the creation of malicious code, do you think that access to elements of document object model and some Javascript functionality be limited? In discussing the answer, describe two types of computer attacks/ viruses that may be ini..

  Execute a set adt in java using a singly linked list

Execute a Set ADT in Java using a singly linked list

  What type of auditing would be appropriate for a bank

Take your current information of Oracle Logs ect and project how a bank may make use of the integrity control mechanisms. This is more of a speculate than a cold hard fact questions.

  Make a stack area at 1000h

Push 10h bytes, located at data memory addresses 60000h to 6000fh, on the stack using indirect addressing. Then pop stack to memory addresses 62000h to 6200fh using indirect addressing. Load unique data into the 10h bytes in order to test the prog..

  How to developing an information management framework

List and describe the steps involved in developing an Information Management framework.

  What capability vp mode in windows 7 operating system

what are the pros and cons of upgrading an operating system versus installing a new image of OS? Describe some of your own experiences at work or at home.

  Identify the three basic kinds of e-commerce

Identify the three basic sorts of e-Commerce. How do their strategic roles differ? What are the benefits and disadvantages to organizations, sellers, and consumers.

  Explain how information systems can be used

Briefly describe the processes that are necessary for an organization to have a mass-customization capability. How does it relate to "micro marketing"? express the process known as General Electric Direct.

  Define the benefits of network segmentation

describe each mechanism's approach for connections establishment and termination.define the benefits of network segmentation.

  Possible media solutions that will support this download

You are sitting at your desk at work, using your laptop computer. The boss calls an emergency meeting for you and several coworkers, and asks everyone to bring his or her laptop computer.

  How the project management life cycle be efficient

How the Project Management Life Cycle be efficient.

  Generating the crow’s foot erd

Provided the following business scenario, generate a Crow’s Foot ERD utilizing a specialization hierarchy if suitable. Tiny Hospital keeps the information on patients and the hospital rooms.

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