NAME
hsh - Holberton Simple Shell command interpreter (shell)
SYNOPSIS
./hsh
[command] [arguments ...]
DESCRIPTION
The hsh (Simple Shell) is an end of the trimester project for students at Holberton School of Software Engineering. The objective is to write a simple UNIX command interpreter that acts closely to sh
Overview
A shell is a command-line interpreter that provides a command line user
interf ace. The shell we built is a simplified iteration of a command
line similar to bash or dash. Simple Shell can be used in both interac‐
tive and non-interactive mode. In interactive mode the prompt will have
() around the $ sign ($). The first argument at argument [0] is under‐
stood by the shell to be a command. The shell will then run that com‐
mand if it can be found and arguments after t he first are treated as
modifiers or options.
gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
Article from medium blog post What happens when you type ls -l in shell
- cd - changes current directory of the process.
Syntax : cd [DIRECTORY]
-
exit - to exit from the shell you type exit and press ENTER.
-
env - prints the environment
| Files | Description |
|---|---|
| path.c | Contains functions for finding and executing the path. Also appends the command to the path. |
| hsh.c | Simple Shell |
| builtin.c | Contains built-ins for the shell. Function for the env built-in can be found in hsh.c |
| error.c | Handles errors for the shell |
| helper_functions.c | Contains helper functions that we built ourselves (strncmp, strcpy, strlen, etc) |
| shell.h | header file containing global varialbes |
| vect.c | Tokenizing function |
Contributors to the Holberton Shell project
- Mark Hedgeland
Twitter LinkedIn Personal Site
About
I am a full-stack software engineer. I enjoy building interesting projects, and learning new methods, and refining the way I think about code. In my free time, I enjoy writing and playing music, collaborating with friends, and learning new engineering techniques. I feel that the only way to truly understand software is to immerse yourself, and enjoy the process. If you have any questions, or just want to chat, reach out to me on social! - Mohameth Seck
