Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaronlking/lobo-shell
This is a program written in C that simulates a computer's command line shell.
https://github.com/aaronlking/lobo-shell
Last synced: 10 days ago
JSON representation
This is a program written in C that simulates a computer's command line shell.
- Host: GitHub
- URL: https://github.com/aaronlking/lobo-shell
- Owner: aaronlking
- Created: 2022-12-30T21:28:19.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-30T21:34:46.000Z (about 2 years ago)
- Last Synced: 2024-11-06T21:42:20.141Z (about 2 months ago)
- Language: C
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lobo Shell -- CS450 Project 2
## Contributors:
- [Aaron King](https://github.com/aaronlking)
- [Joseph Henderson](https://github.com/jhendssu)
- [Gary Singh](https://github.com/Gary-Git)
- [Owen Mastropietro](https://github.com/OwenMastropietro)## Instructions To Run in project directory terminal:
1. `$ make run`
2. `$ make valgrind`
3. Or you can figure something else out...## Important Notes:
- I suggest collapsing all the code / comments if your editor supports that.- I have modified his splt_cmd_line() function. I added comments to it that
hightlight his use of strtok_r() and how I have modified it.- I #defined a preprocessor directive, DEBUG, to sort of make use of the functionality behind the verbose flag from Project 1.
- main() will loop on user input, calling his splt_cmd_line() function repeatedly
to split the line into commands, separated by pipes, |, and will then call my
sgt_major_pipage() function which will loop through each command in commands,
further delimiting each command into argv-like arrays, separated by whitespace,
calling my handle_single_command() function to execute each command as if it
were a stand-alone command.- Most recent update: added logic for attempting arbitrary pipes...
DOES NOT WORK :(. Currently commented out said logic so that it can can still be
ran to test running stand alone commands found between pipes.- I have often executed the following sequence of commands while testing / creating this logic:
1. `$ make valgrind`
2. `$ echo hello | echo hi | ls`