Table of Contents
This is a mandatory project for Holberton School made by Juan Matias Rossi from cohort 18. This project is about recreate or build a command intepreter similar to linux shell. This recreation can only take one command per usage and can't process special characters: ", ', `, \, *, &, #
.
Simple shell is a interpreter command-line between kernel and the user mode for it can use the resources of the Operative System. This recreation tokenize the input given into strings, checks the permission of the paths/files and executes the command. This requieres at least Ubuntu 14.04 LTS and gcc 4.8.4.
Clone the repository
git clone https://github.com/SchneiderSix/holbertonschool-simple_shell.git
Use these flags if you want to compile
gcc -Wall -Werror -Wextra -pedantic -std=gnu89
Compile with every .c and the header from this repo (you can add your files here if you want)
gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c nice_header.h
Execute the built executable file
./a.out
You can read the man file just like this
man ./man_1_simple_shell
You can use this recreation in "Non-interactive mode" or "Interactive mode", remember "this recreation can only take one command per usage and can't process special characters: ", ', `, \, *, &, #.
". You can close the program writing exit
or pressing ctrl + D
.
-
Interactive mode
Execute the./a.out
file and write the input. -
Non-interactive mode
Use echo the command wanted and pipe it with the./a.out
file, for exampleecho "ls" | ./a.out
.
- Juan Matías Rossi - Instagram - Linkedin - knuckles116635@gmail.com
Project Link: https://github.com/SchneiderSix/holbertonschool-simple_shell