https://github.com/amany-mm/simple_shell
Unix shell built to mimic sh
https://github.com/amany-mm/simple_shell
c shell
Last synced: 2 months ago
JSON representation
Unix shell built to mimic sh
- Host: GitHub
- URL: https://github.com/amany-mm/simple_shell
- Owner: amany-mm
- Created: 2023-11-15T21:17:54.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T08:59:40.000Z (over 2 years ago)
- Last Synced: 2025-01-18T06:13:26.762Z (over 1 year ago)
- Topics: c, shell
- Language: Shell
- Homepage:
- Size: 67.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Authors: AUTHORS
Awesome Lists containing this project
README
# simple_shell
A simple UNIX command interpreter.
## Resources
* [Unix shell](https://en.wikipedia.org/wiki/Unix_shell)
* [Thompson shell](https://en.wikipedia.org/wiki/Thompson_shell)
* [Ken Thompson](https://en.wikipedia.org/wiki/Ken_Thompson)
* man or help: `sh` (Run sh as well)
## Compilation
```
gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh
```
## Testing
**Interactive Mode**
```
$ ./hsh
($) /bin/ls
hsh main.c shell.c
($)
($) exit
$
```
**Non Interactive Mode**
```
$ echo "/bin/ls" | ./hsh
hsh main.c shell.c test_ls_2
$
$ cat test_ls_2
/bin/ls
/bin/ls
$
$ cat test_ls_2 | ./hsh
hsh main.c shell.c test_ls_2
hsh main.c shell.c test_ls_2
$
```
## Environment
* Language: C
* OS: Ubuntu
* Compiler: gcc
* Style guidelines: [Betty style](https://github.com/alx-tools/Betty/wiki)