Commit 1fbc381b authored by Lindsay Knupp's avatar Lindsay Knupp
Browse files

Lab 9.4 completed

parent 3abe8bb0
......@@ -36,6 +36,7 @@ int main (int argc, char *argv[]){
int entertwice;
char * enter = NULL;
size_t enter_length;
// Ask user for input
while(1){
......@@ -50,13 +51,12 @@ int main (int argc, char *argv[]){
//get user input from terminal
getline(&line,&length,stdin);
char* arr[] = {"ls",NULL};
if (line[0] == '\n'){
getline(&enter,&enter_length,stdin);
//char* arr[] = {"ls",NULL};
entertwice = 0;
}
else{
length = strlen(line);
line[length-1] = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment