project about creating your own simple (mini)shell, taking bash as reference.
our very first group project, that i got to work on with marianna (ง •̀_•́)ง (ง •̀_•́)ง
minishell is a re-creation of a basic unix shell, which is a tool that lets users interact with the computer by typing commands.
it replicates key features of a full-fledged shell, such as command parsing, execution, and basic file manipulation.
these are some resources we used:
• playlist with videos about all things minishell
• let's build a linux shell - a tutorial
• minishell map spreadsheet (744 test cases)
• reallyshell: extensive minishell tester by btvildia
-
clone this repository:
git clone git@github.com:idleira/minishell.git minishell && cd minishell
; -
use
make
to compile the project; -
run the program with
./minishell
-
have fun ⸂⸂⸜(രᴗര๑)⸝⸃⸃
-
to exit the program simply press
ctrl + d
or typeexit
; -
to clean up:
• use
make clean
to remove .o files;• use
make fclean
to clean up the project directory by removing all generated files.
→ command-line interface: minishell greets you with a prompt, ready to execute your commands swiftly;
→ command parsing and execution: it efficiently parses and executes commands, from listing files to running scripts;
→ built-in shell commands: minishell supports built-in commands for easy directory navigation and status checks:
command | description |
---|---|
pwd |
print name of current/working directory |
cd |
change the shell working directory (with a relative or absolute path) |
env |
print the environment |
echo |
echo the string(s) to standard output. -n flag: do not output the trailing newline |
export |
set export attribute for shell variables |
unset |
unset values of shell variables |
exit |
exit minishell with the exit status specified |
→ environment variable management: you can easily set, get, and manage environment variables in Minishell;
→ input/output redirection and piping: it simplifies input/output redirection and command piping;
→ signal handling and process management: minishell effectively manages processes and handles signals.
→ our minishell doesn’t support command chaining with ;, &&, or ||, but excels in other features.
completing this project was both challenging and demanding, pushing us to the limits of our coding abilities. ᕦ(ò_óˇ)ᕤ
however, it also provided invaluable learning experiences that have given us the confidence to tackle almost any programming challenge.
to marianna for collaboration — it was a great experience working together. (´。• ᵕ •。`)♡