#42Exam-rank-04
Small shell (terminal) that executes simple commands with support for pipes (|) and separators (;). Project developed in 42 Luanda to understand the fundamentals of processes, fork, execve, pipe and chdir.
Implement a microshell capable of:
- Execute commands with multiple arguments
- Support chained commands with
; - Support
|pipes - Handle the built-in
cdcommand - Manage basic runtime errors and directories
cc -Wall -Wextra -Werror microshell.c -o microshell🧪 Usage Executing simple commands bash Copy Edit ./microshell ls -l ; echo Hello Execution with pipes bash Copy Edit ./microshell ls -l | grep microshell 📝 cd command behavior bash Copy Edit ./microshell cd nonexistent_folder Exit:
vbnet Copy Edit error: cd: cannot change directory to folder_inexistente ❌ Error handling cd with invalid arguments
commands that do not exist or fail to execute
fork or pipe failures are ignored in a simplified way (according to the project scope)
🔧 Implemented functions exec_it – Execute commands with execve
cd – Own implementation of the cd command
ft_strlen – Helper function to count the length of strings
main – Handles parsing, fork, pipe, and execution control