-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClient.cpp
More file actions
executable file
·40 lines (36 loc) · 1.18 KB
/
Client.cpp
File metadata and controls
executable file
·40 lines (36 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*//==============================================
CS433HW2 Unix Shell
Names: Haley Minshell, Chris Morikawa
Date: 10/7/2016
Course: CS433
Assignment: Programming Assignment 2
Description: Designing a C program to serve as a sheel interface that accpets user
commands and thenexecutes each command in a separate process.
Instructions:
1. In order to complie the program, first type make on the command line.
2. Then you will see a executable called cs_433_hw2.
3. Type ./cs433_hw2 to run the program.
Complier: g++
File type: source file
*///=============================================
#include "Shell.h"
#include <string>
#include <iostream>
using namespace std;
//============================
/*
Function: The driver to run the shell program.
*/
//=============================
int main()
{
Shell shell; // new shell program
string cmd_input; //used to take the user's input
while(cmd_input!="exit")//While the user didn't enter exit.
{
cout << "MM_shell> ";//Prompt for the user to enter the command
getline(cin,cmd_input);//grab the user's command
shell.parseCmd(cmd_input);//Execute the command through the functions.
}
return 1;
}//end of main