Skip to content

This is a basic implementation of a Shell - Authors: Joel Ramirez y Alfredo Delgado

Notifications You must be signed in to change notification settings

AlfredPianist/simple_shell

Repository files navigation

Holberton Simple Shell

This is a simple simulation of command line interpreter for linux using only, vi and emacs, compiled with gcc -Wall -Werror -Wextra -pedantic, and debugged with gdb and valgrind.

Flowchart

FLOWCHART

Setup

Compile the program using gcc -Wall -Werror -Wextra -pedantic *.c -o hsh and run the interpreter mode with ./hsh. In addition, use echo "ls" | ./hsh or ./hsh < scripts_file or cat scripts_file | ./hsh to use non-interactive mode.

$ cat scripts_file
ls
pwd
ls -la

Code Examples

To list the current directory:

$ ./hsh
#cisfun$ ls
lslist.c              memory.c                README.md    test        builtins_2.c  ...
#cisfun$ exit

Or use

$ echo "ls" | ./hsh
lslist.c              memory.c                README.md    test        builtins_2.c  ...

Or in general

$ ./hsh
#cisfun$ [COMMAND] [ARGUMENTS]
...
#cisfun$ exit

$ echo "[COMMAND] [ARGUMENTS]" | ./hsh
...

$ cat scripts_file
[COMMAND] [ARGUMENTS]
[COMMAND] [ARGUMENTS]
...
$ cat scripts_file | ./hsh
....

Authors

This program was made by Alfredo Delgado Moreno (@Alfred_Pianist) and Joel Alexander Ramírez Núñez as a second major project for the first trimester of the foundations program of Holberton School.

About

This is a basic implementation of a Shell - Authors: Joel Ramirez y Alfredo Delgado

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages