Skip to content

APM1015/project2-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

The shell lab was pretty difficult for me. I originally implemented the built in functions and found those to be easy. I then started working on
my redirection functions and after a lot of reading I implemented them using dup2(). I then went straight to the piping process, and actually got a 
solid understanding of it. I found a lot of good readings and videos on the topic in addition the the useful pseudocode provided in the lab manuel. I spent a lot of time on this topic and originally implemented a regular piping function. Then made my way to the for loop with the recommended array. I handled
the three cases of the two edges and the middle pipes. The array with the for loop was really confusing me as I originally was doing "fd[]" for the pipe values but eventually figured out how to implement the pipes with an array. From here I ran into a lot of difficulty. I had skipped over the PATH parsing section and spent many hours trying to figure it out. I was able to get it to work using strtok, execv, PATH, and I had to implement the access() function as I was running into many errors. Unfourtunately, I could only get this to work for the ls command, and the wc command was not working. I then implemented a while loop while to parse the imput and call my other functions. This while loop was able to work correctly for my built ins, but I was having trouble having it work with the testing for my redirection and piping functions. 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages