simple-shell is a interpreter command-line between kernel and the user mode for it can use the resources of the Operative System. This program is done, how final project of trimester of Holberton school for consolidate the theory and practice of the C programming language.
File | Description |
---|---|
holberton.h | Contain all the libraries and functions created by us |
aux_func.c | handler - handles ctrl + c signal, exec_path - check if executable exists on directory |
error.m_.c | error_message - compose the standar error message, error_helper - sends char to write |
free_.c | free_em_all - will free double pointer, print_env - prints all of the environment variables to the output, free_listint - free list and sets head to NULL |
get_path | get_path - will searh if command exist on any of PATH's directories |
list_maker.c | list_maker - add node initialize it and give it a string, free_list - free list and sets head to NULL, listint_len - list nodes of a list |
shell_1.c | shell_1 - Initiliaze the proccess and execute |
shell_.c | main - Initialization of the shell! |
s_strings.c | s_strdup - duplicate a string, s_length - determine lenght of string, s_strcopy - copy n bytes from one string to another, strcmpn - compares n bytes in two strings slash - append slash and comannd to directory in linked list |
tokenizer.c | tokens - Divide a string with delimiter into tokens |
- manpage - Technical manual about the simple shell
- Display:
- The posible command to enter "ls"
- Wait and hear to other command for example; "pwd"
- After the mini-shell follow a new line "\n".
- Print the $ at the init for know if is inside of the shell and after wait to the follow command, if the user doesn't write exit or EOF.
- If executable not is found with stat, print a error message and return error with POSIX.
- Handle errors in case that some function fail to execute
- Handle the EOF "End of File" the which verify
- Handle mode non-interactive
- exit builtin - It does that the program end the proccess
- env builtin that print the current enviroment
- Ubuntu 14.04 LTS or greater
- gcc 4.8.4
- Clone this repository: git clone "https://github.com/Teslothorcha/simple_shell"
- Change directories into the repository: cd simple_shell
- Compile: gcc with flags
- Execute ./nameofexecutable
- What happens when you type ls -l in the shell:
Juan David
@Teslothorcha
Santiago Yanguas
@TYGames3