Write a simple shell command line interpreter Unix in C
gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
$ ./hsh hsh$ /bin/ls hsh main.c shell.c hsh$ hsh$ exit $
Prints out the current environment.
The cd command, also known as chdir, is a command-line shell command used to change the current working directory in various operating systems
cat - The most common use of cat is to read the contents of files
cp - copy files to another file
grep - searches a file for a specified pattern
less - less is a command that displays file contents or command output one page at a time in your terminal
ls - lists all files and directories
mv - moves one file into another file
pwd - prints out the current working directory
$ echo "/bin/ls" | ./hsh hsh main.c shell.c $
Unless specified otherwise, your program must have the exact same output as sh (/bin/sh) as well as the exact same error output. The only difference is when you print an error, the name of the program must be equivalent to your argv[0] (See below)
Example of error with sh:
$ echo "qwerty" | /bin/sh /bin/sh: 1: qwerty: not found $ echo "qwerty" | /bin/../bin/sh /bin/../bin/sh: 1: qwerty: not found $
Same error with your program hsh:
$ echo "qwerty" | ./hsh ./hsh: 1: qwerty: not found $ echo "qwerty" | ./././hsh ./././hsh: 1: qwerty: not found $
-
- cd shell
-
- gcc -Wall -Werror -Wextra -pedantic * .c -o hsh
-
- Enjoy it
README file for project simple shell at Holberton School
man page for simple shell project
Header file for simple shell program
Program that runs simple shell included contain helper functions and built-ins
Contributors and authors for this project
- Esteban De La Hoz - Initial work - Esteban1891
- Jose Vallejo - Initial work
This project is licensed under the GPL License - see the GPL 2.0 file for details
Folder contains all tests
