**Write a basic command-line interpreter (or shell) for Solaris (Linux /Unix) in C/C++. You are to use execv to execute commands.**
1: Your program is to print a prompt and then wait for the user to type a command. Your program then executes the command, and the loops back to print another prompt. Thus the program is an infinite loop.
2. The command may be the name of any executable file in any directory specified by the path environment variable. The command may be followed by options that are legal for that command. For example, if the command string is “ls-1??, your program will execute (run) the file “/bin/ls?? with the option string “-1??.
[url removed, login to view] must include:
“Name?? in one line
“CS?? in another line
“Assignment#1?? in another line
Hints: Normally your program will execute the command as a separate process and wait until the execution of the command terminates before printing the next prompt, However, if the last character if the command string is a ampersand (“&??), then your program should immediately print the next prompt without waiting for the command for finish executing. (This conforms to the behavior of all commonly used Unix shells.)
You can use any hard-coded prompt that you want-except that the prompt must be visible, restricted to one line, and fairly short.
You must engage is safe input from the user. In other words, your program must not have nay possibility of buffer overflow. (Use fgets rather than gets to read the user’s command line.)
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased.
it should be unix/linux machine comatible.
it should be unix/linux machine comatible