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.
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 -laTo list the current directory:
$ ./hsh
#cisfun$ ls
lslist.c memory.c README.md test builtins_2.c ...
#cisfun$ exitOr 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
....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.
