Skip to content

krivahtoo/simple_shell

Repository files navigation

Simple Shell

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.

Build

$ make
# or
$ gcc -Wall -Werror -Wextra -pedantic -std=gnu89 *.c -o hsh

Run

Interactive

$ ./hsh

Non-interactive

$ echo "ls" | ./hsh

Features/TODO

  • 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
  • Implement the env built-in, that prints the current environment
  • Implement the setenv and unsetenv 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 comments (#)
  • Handle file as input, i.e. ./hsh file

Contributors

Made with contrib.rocks.

About

a simple implementation of the UNIX shell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published