Shell is a command line interpreter that enables us to access an Operating system's services in that it interprets commands from the user so that the OS can understand them and perform the appropriate functions.
This project is about building a simple basic shell program.
The project is created with:
- C programming language
To run this project, install shell locally:
$ gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
$ ./hsh
To get user input: `char *get_user_input() { size_t n = 0; char *buff; ssize_t returngetline = 0;
returngetline = getline(&buff, &n, stdin); if (returngetline == -1) { free(buff); fprintf(stdout, "\n"); exit(EXIT_SUCCESS); }`
-
Gets user input
-
Tokenizes a function
-
Parses a function
-
Executes the whole process
- change working directory
- Print the environment
- List all files in a directory
- exit the Shell
- ...
Development of the project is complete
This shell program is based on the Holberton School program.