This is our litle tiny Shell named k_shell. If you want to learn about k_shell, you can this file or you can go to the k-shell documentation.
This project was created to Holberton School.
This is a shell written in c
for final project of Holberton School
. k_shell
its based on sh
and support just the main functionalities.
The project structure can't have source inside directories, because the only way for compile in this case is gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
This shell receive the name of K-shell
, because represent our region, la costa
. K-shell
stands for Kayman
that means caiman
the animal of this region, so represent our culture and our live style. And the other part, shell
is just the postfix
- Gcc >= 4.8.4
- Linux
git clone https://github.com/davixcky/simple_shell.git shell
cd shell
gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
- Enjoy it
k_shell supports two modes interactive
and non interactive
.
./hsh
./hsh
and then type the commands that you want to execute- You can type a command and the prompt appear show again
echo "command" | ./hsh
, command is the command that you want to execute- Each time that you execute a command, the shell close
Command
echo "/bin/ls" | ./hsh
Output
AUTHORS commands.h error.c execute.c hsh permissions.c printers_err.c README.md start.c text.h utils_text2.c
commands.c environment.c error.h general.h main.c printers.c printers_out.c shell.h text.c tokenization.c utils_text.c
Command
./hsh
Then the prompt appear, so you can type in the command line, and press return
Ex - /bin/ls
Output
AUTHORS commands.h error.c execute.c hsh permissions.c printers_err.c README.md start.c text.h utils_text2.c
commands.c environment.c error.h general.h main.c printers.c printers_out.c shell.h text.c tokenization.c utils_text.c