We made a simple shell.
- User inputs are tokenized by IFS(Internal Field Separator). IFS is fixed to space and tab.
- If a token is extension parameter(e.g. $PWD), replace it with matching value in environment parameters.
To implement pipe('|'), we used an anonymous pipe. This program only supports sequential command processing. Sadly, we didn't implement parenthesis and background operation.
- Open pipe()
- fork()
- exec() in child process except for builtin function.
We implemented cd, pwd, export, unset, echo, exit. These functions don't require fork().
Enter command 'make' in the cloned folder. Then executable named 'minishell' will appear. Run it! './minishell'