Skip to content

Yamada-Ika/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

Description

minishell is a very simple shell written in C. It has the following commands built in.

  • echo
  • cd
  • pwd
  • export
  • unset
  • env
  • exit

Requirement

  • OS X
  • C compiler
  • make
  • readline

To install readline on a mac, use brew, etc. as follows.

brew install readline

Build

Execute the following command in the appropriate directory.

https://github.com/Yamada-Ika/minishell.git
cd minishell
make

Usage

Execute the following command in the directory where minishell exists. After execution, a prompt will appear.

./minishell
minishell>

Features

  • It reproduces the following basic behaviors

    • Pipes, redirects, and heredocs
    • Environment variable registration, deletion, and variable expansion
  • example

minishell> echo aaa | cat | cat | cat | cat
aaa
minishell> cat Makefile > log
minishell> diff log Makefile | cat -e
minishell>
minishell> cat << EOS
> hoge
> EOS
hoge
minishell> export test=hoge
minishell> echo $test
hoge
minishell> unset test
minishell> echo $test

minishell>
  • \, ;, and so on cannot be interpreted!

Author

@shige-lab

Licence

This software is released under the MIT License, see LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published