8000 GitHub - Farzan-Kh/Cell: A basic shell implemented in C
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Farzan-Kh/Cell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Shell

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.

Features

  • 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.

Project Structure

.
├── build/          # Compiled object files and the final executable
├── include/        # Header files
├── src/            # Source code files
├── Makefile        # Build system
└── README.md       # Project documentation

Key Files

  • 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.

Build Instructions

To build the project, ensure you have gcc installed, then run:

make

This will compile the source files and generate the executable my_program.

Usage

Run the shell with:

make run

You will see a prompt (>) where you can type commands. For example:

> ls
> cd ..
> help
> exit

Clean Up

To remove compiled files and the executable, run:

make clean

License

This project is for educational purposes and does not include a specific license.

About

A basic shell implemented in C

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0