minishell is a simple shell program that implements the minimum functionality of bash.
Using the C programmming language.
git clone "URL"
cd minishell
make
./minishell
- Special characters to be interpreted:
- quotes : '', ""
- pipe : |
- redirect and heredocument : <, <<, >, >>
- Implemented builtins:
- echo with option -n
- cd with only a relative or absolute path
- pwd with no options
- export with no options
- unset with no options
- env with no options or arguments
- exit with no options
- Environment variables ($ followed by characters) expand to their values.
- $? expand to the exit status of the most recently executed foreground pipeline.
- ctrl-C ctrl-D ctrl-\ work like in bash.
- When interactive:
- ctrl-C print a new prompt on a newline
- ctrl-D exit the shell
- ctrl-\ do nothing
- rsudo's Hatena Blog: bash再実装課題の振り返り
- rakiyama's Hatena Blog: シェルの再実装しましたというお話。
