This is a simple implementation of the UNIX shell (/bin/sh
).
This is implemented as part of the ALX SE Low-level programming & Algorithm group project.
$ make
# or
$ gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh
$ ./hsh
$ echo "ls" | ./hsh
- Handle the
PATH
- Implement the
exit
built-in, that exits the shell- Usage:
exit status
, where status is an integer used to exit the shell
- Usage:
- Implement the
env
built-in, that prints the current environment - Implement the
setenv
andunsetenv
builtin commands - Implement the builtin command
cd
- Handle the commands separator
;
- Handle the
&&
and||
shell logical operators - Implement the
alias
builtin command - Handle variables replacement
- Handle the
$?
variable - Handle the
$$
variable
- Handle the
- Handle comments (
#
) - Handle file as input, i.e.
./hsh file
Made with contrib.rocks.