This a collaborative project making by Juan Delgado and Steffany Naranjo Vargas , For Holberton School Cali. In this repository you will find the simple_shell project . In this project we have to develope our own UNIX command interpreter or shell.
This project works in the same ways as sh
works is equal than (/bin/sh)
Read or watch:
man or help:
sh
(Runsh
as well)
gcc 4.8.4
using the flags -Wall
-Werror
-Wextra
and -pedantic
- Unless specified otherwise, your program must have the exact same output as
sh
(/bin/sh
) as well as the exact same error output. - The only difference is when you print an error, the name of the program must be equivalent to your
argv[0]
(See below)
Example of error with sh
:
$ echo "qwerty" | /bin/sh
/bin/sh: 1: qwerty: not found
$ echo "qwerty" | /bin/../bin/sh
/bin/../bin/sh: 1: qwerty: not found
$
Same error with your program hsh
:
$ echo "qwerty" | ./hsh
./hsh: 1: qwerty: not found
$ echo "qwerty" | ./././hsh
./././hsh: 1: qwerty: not found
$
Your shell will be compiled this way:
gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
And you manual will be compiled in this way:
man ./man_1_simple_shell
Your shell should work like this in interactive mode:
$ ./hsh
($) /bin/ls
hsh main.c shell.c
($)
($) exit
$
But also in 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
$
Steffany Naranjo Vargas