Holberton Shell (hsh) is a simple command line shell. This shell was built as a project for Holberton School. This is a culmination of everything we have learned about the C programming language thusfar.
To use hsh, you can give it commands. hsh commands follow the following syntax: command name {arguments}
.
Typing the filename in a program located in any of the directories in the [PATH] runs the command.
ls
The ls
command lists all directories and files in the current working directory.
ls
- lists all files and directories of current working directory
To clone the repo (depending on whose repo):
git clone https://github.com/WalLee2/simple_shell.git
git clone https://github.com/jimmythongtran/simple_shell.git
Here is the line to compile:
gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
holberton.h - Header file: struct definitions, macros, function prototypes and standard libraries included
_getenvAndPATH.c - gets the environment and seperates each directory of PATH
_createTokenAndChildP.c - mallocs space to create tokens and creates child processes
- Hat tip to Holberton School