This project is a simple shell implementation in C. It allows users to execute commands, navigate directories, and use built-in commands like cd
, help
, and exit
.
- Execute system commands using the shell.
- Built-in commands:
cd
: Change the current directory.help
: Display help information about the shell.exit
: Exit the shell.
- Tokenizes user input and handles arguments.
- Supports launching external programs.
.
├── build/ # Compiled object files and the final executable
├── include/ # Header files
├── src/ # Source code files
├── Makefile # Build system
└── README.md # Project documentation
src/main.c
: Entry point of the program.src/shell.c
: Implements the main shell loop and command execution.src/parse.c
: Handles input reading and tokenization.src/ext.c
: Launches external programs.src/builtins.c
: Implements built-in shell commands.include/
: Contains header files for the project.
To build the project, ensure you have gcc
installed, then run:
make
This will compile the source files and generate the executable my_program.
Run the shell with:
make run
You will see a prompt (>
) where you can type commands. For example:
> ls
> cd ..
> help
> exit
To remove compiled files and the executable, run:
make clean
This project is for educational purposes and does not include a specific license.