Skip to content

Reyshyram/minishell

Repository files navigation

Minishell

A small recreation of tcsh, using an Abstract Syntax Tree. Handles pipes, redirections, ||, &&, variables, sperators, ...

Usage/Examples

Simply run the mysh binary and execute the commands you like. For example:

./mysh
~
> echo $HOME
/home/reyshyram
~
> builtins
builtins env setenv unsetenv set unset cd exit
~
> set name=Reyshyram
~
> echo Hi $name!
Hi Reyshyram!
~
> ls notexist || echo Logical or
ls: cannot access 'notexist': No such file or directory
Logical or
~
> (cd ..; pwd) && pwd
/home
/home/reyshyram
~
> notfound
notfound: Command not found.
[84] ~
> exit 0
exit

How to compile/run

Simply use make to compile the program:

make -j$(nproc)

And then run the resulting binary, in this case, mysh.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages