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
A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t


How congestion is controlled in TCP? One of the most significant aspects of TCP is a mechanism for congestion control. In main modern internets, extreme long delays or packet l

Question: Read the following case study and answer the questions based on it. The local airline company needs to develop a system for controlling air traffic at the airport

Q. How to Set Table Properties in dreamweaver? Now you will use table Property inspector to clear the extra space in navigation buttons table and to add a background color in t

the c code for hypothetical reliable data transfer protocol

Q. Show the Process Management for parallel virtual machine? Process Management  int pvm_mytid( void ) Returns the tid of the calling process. Tid values les

What is the difference between the following two lines of Verilog code? #5 a = b; a = #5 b; #5 a = b; Wait five time units before doing the action for "a = b;". Value assig

What is a digital comparator? Ans: Digital Comparator: The comparison of two numbers is an operation which evaluates if one number is greater than, less than, or equival