https://github.com/orlovt/c-shell
Low level implementation of a shell in C
https://github.com/orlovt/c-shell
Last synced: about 1 year ago
JSON representation
Low level implementation of a shell in C
- Host: GitHub
- URL: https://github.com/orlovt/c-shell
- Owner: orlovt
- License: mit
- Created: 2024-03-03T18:42:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-24T16:56:40.000Z (about 2 years ago)
- Last Synced: 2025-04-12T06:49:35.212Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# C-shell
## Description
This repository contains a simple low level implementation of a Unix shell in C. It includes basic shell commands like `cd`, `ls`, and `wc`, each implemented in their own C files. This implementation also includes the `pipe` and `STDOUT` redirection functionality. The `shell.c` file contains the main shell loop and logic. This project is suitable for educational purposes, for those interested in understanding how shell commands are implemented at a lower level.
## Installation
To install, clone the repository and use the provided Makefile:
```
git clone https://github.com/orlovt/C-shell.git
cd C-shell
make
```
## Usage
After compiling, you can run the shell executable:
```
./shell
[C-shell]/Users/path/to/repo/C-shell$
```
From there, you can use the implemented commands within this custom shell environment.
```
[C-shell]/Users/path/to/repo/C-shell$ ls -R \path/to/dir
```
```
[C-shell]/Users/path/to/repo/C-shell$ ls -R | wc > out.txt
```