Print a prompt, Computer Engineering

When your shell is waiting for input from the user, it should first print a prompt. The prompt should consist of the current working directory followed by the _>_ character. Here is an example of the prompt:

/home/ p r o j e c t s / cs200 / spring13 / s h e l l >

After a user performs a command, the prompt should be printed again on a new line. If the user changes the current working directory, your prompt should show the change. I would recommend using the printf() function from stdio.h for printing the prompt.

Posted Date: 4/3/2013 2:54:20 AM | Location : United States







Related Discussions:- Print a prompt, Assignment Help, Ask Question on Print a prompt, Get Answer, Expert's Help, Print a prompt Discussions

Write discussion on Print a prompt
Your posts are moderated
Related Questions
How exceptions are handled in java? Exception handing In Java: A java exception is an object which describes an exceptional condition which has occurred in a piece of code.

Hiding data within the class and making it available only by the methods. This method is used to protect your class against accidental changes to fields, which might leave the clas

EXPLAIN SIDE EFFECT OF SCAN CONVERSION WITH DIGRAM

Explain the term - Integrity In most cases, corporate data should remain unchanged by third parties, so the system should be capable of ensuring that only authorised personn

Write a CGI program that prints date and time at which it was run. #!/bin/sh # # CGI script that prints the date and time at which it was run # # Output the documen

Q. Explain Sample Instruction Format of MIPS instruction? All MIPS instructions are of same size and are 32 bits long. MIPS designers chose to keep all instructions of same len

Forward Chaining: Now we have suppose we have a set of axioms that we know are true statements about the world. Whether we set these to each be an initial state of the segoal

Encapsulation of OOA Encapsulation separates the interface of an abstraction from its implementation. By taking the above example i.e. of a car, we can now categorize them as:

Give the details of excess 3 codes and gray code using four binary digits. Ans: Table of excess 3 codes and gray code using four binary digits Binary

What is known as multiphase clocking? When edge-triggered flip flops are not used, two or more clock signals may be required to guarantee proper transfer of data. This is calle