[Passion] Creating a Terminal
Project of creating an actual bash shell.
Introduction
While browsing youtube found a video of a guy talking about his college studies in Yale. And in one of his classes, he said they actually implemented a bash shell (not a script, amazing) . This reminded me how limited my current school was.. Couldn’t pass by this treasure:)
Starting..
Luckily, during my Data Sturctures class (22-1) , I read / tried to understand the professor’s driver code. This helped me a lot when implementing the main() function and the basic framework. Now time to fill in the code (The most exicting part) . I’ve recoreded my references at the top of my shell.h header [file] (https://github.com/young170/Terminal/blob/main/shell.h).
[Link] (https://github.com/young170/Terminal) to my github project.
ls command
Tried to code the most frequently used command, ls. It was my first time coding in the Linux environment with C so took me some time searching for functions. Received a lot of help from the internet (as I am a progoogler) . However, you can’t just copy and paste and say you’ve learned something. I also researched the difference between scandir() vs readdir() (and other stuff to ever-improve my code) . Additionally, I really want to try experimental stuff on my project because I don’t want to risk my grades on this.. Maybe mounting threading on ls..? or adding the -al option? oh, definetly adding pipe.
Framework
Realized I’m gonna have a lot of chances to practice C (DS camp, DS TA, etc.) so time to prioritize. First, copied the code from GeekforGeeks and erased function I’ve already implemented. Then, tried to understand what they were trying to do. Learning a lot.
Ideas from Yes_Sir
One of the members in my lab went to KAIST for his master’s degree. Before he left he said he wanted an CLI scheduler. [This] (https://github.com/LuZack/Yes_Sir.git) is the link to his github repo. It’s amazing. I really want to help and keep contact with him.