https://github.com/rurangiza/minishell
Lighweight version of bash
https://github.com/rurangiza/minishell
shell unix
Last synced: 2 months ago
JSON representation
Lighweight version of bash
- Host: GitHub
- URL: https://github.com/rurangiza/minishell
- Owner: rurangiza
- Created: 2023-01-16T15:34:31.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-21T12:45:51.000Z (about 3 years ago)
- Last Synced: 2025-03-18T08:21:18.015Z (over 1 year ago)
- Topics: shell, unix
- Language: C
- Homepage:
- Size: 8.22 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
This project is about creating a lightweight version of bash (Born Again Shell).
## Features
- prompts user for input
- checks user input for valid commands else returns appropriate errors
- executes commands with options (Ex: `ls -l`)
- handles multiple pipes (Ex: `ls | head -2 | wc`)
- custom built-ins (cd, pwd, echo, unset, export, env)
- I/O redirections (<, >, <<, >>)
- handles signals (Ctrl-C, Ctrl-D, Ctrl-\)
## What I learned
- UNIX programming in general
- bash's behaviour in various situations and how it is implemented
- How to create processes and retrieve valuable informations from them. Like exit codes
- How to create a pipeline that handles I/O redirections
- How to analyze files
## Tips & Tricks
- Use the `lsof -c ` or `ps aux | grep program_name` commands to see the current processes of a specific program
## Useful Links
### Tutorials
- Tutorial - [Write a Shell in C](https://brennan.io/2015/01/16/write-a-shell-in-c/) by Stephen Brennan
- [Let's Build a Command Line Shell in C](http://www.dmulholl.com/lets-build/a-command-line-shell.html)
- [Multipipe_tutor](https://clemedon.github.io/Multipipe_tutor/)
- [Pipe: an Inter-Process Communication Method](https://www.codequoi.com/en/pipe-an-inter-process-communication-method/)
### Manuals
- Systems Programming : Chapter 5 : [Writing Your Own Shell](https://www.cs.purdue.edu/homes/grr/SystemsProgrammingBook/Book/Chapter5-WritingYourOwnShell.pdf)
- [The Shell Command Language](https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html)
- [Bash Reference Manual](https://www.gnu.org/software/bash/manual/bash.html)