Welcome to the Simple Shell project!
This is a basic implementation of a command-line shell in C, designed to provide users with a minimalistic yet functional interface for interacting with their operating system. Whether you're a beginner looking to understand the fundamentals of shell programming or an enthusiast who wants to tinker with a simple shell, this project is a great starting point.
Command execution: Run system commands just like you would in a regular terminal. Basic built-in commands: The shell supports a few built-in commands such as cd (change directory) and exit (exit the shell). Input and output redirection: Redirect the standard input and output of commands using < and > operators. Pipeline support: Chain multiple commands together using the | operator for input-output redirection.
In order to enhance your comprehension of the rationale behind our shell, we kindly request you to review this Flowchart:
Follow these steps to get the Simple Shell up and running on your local machine:
-
Clone the repository :
git clone https://github.com/Adib-96/holbertonschool-simple_shell.git
-
Navigate to the project directory:
cd holbertonschool-simple_shell
-
Compile the shell
-
Run the shell :
./hsh
Compilation : gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh
Our shell work like this in interactive mode :
-$ ./hsh
($) /bin/ls
hsh main.c shell.c
($)
($) exit
$
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
$