https://github.com/khammerschmidt/minishell
kathi & mio <3
https://github.com/khammerschmidt/minishell
Last synced: 4 months ago
JSON representation
kathi & mio <3
- Host: GitHub
- URL: https://github.com/khammerschmidt/minishell
- Owner: KHammerschmidt
- Created: 2022-01-25T16:10:08.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-13T20:33:18.000Z (over 2 years ago)
- Last Synced: 2025-01-12T21:32:57.840Z (6 months ago)
- Language: C
- Size: 682 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# minishell
Task: Group project of creating your very own shell, bash is taken as reference.
Subject to 42 Heilbronn's core curriculum.Requirements:
• Display a prompt when waiting for a new command.
• Have a working history.
• Search and launch the right executable (based on the PATH variable or using a relative or an absolute path).
• Not interpret unclosed quotes or special characters which are not required by the subject such as \ (backslash) or ; (semicolon).
• Handle ’ (single quote) which should prevent the shell from interpreting the meta- characters in the quoted sequence.
• Handle " (double quote) which should prevent the shell from interpreting the meta- characters in the quoted sequence except for $ (dollar sign).
• Implement redirections:
◦ < should redirect input.
◦ > should redirect output.
◦ << should be given a delimiter, then read the input until a line containing the delimiter is seen.
◦ >> should redirect output in append mode.
• Implement pipes (| character). The output of each command in the pipeline is connected to the input of the next command via a pipe.
• Handle environment variables ($ followed by a sequence of characters) which should expand to their values.
• Handle $? which should expand to the exit status of the most recently executed foreground pipeline.
• Handle ctrl-C, ctrl-D and ctrl-\ which should behave like in bash.
• Implement the following 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