Skip to content

ak0327/42_minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

Re-implemented a simple shell.
It partially behaves like GNU Bash version 4.4.0.

demo


Usage (Linux / MacOS)

Install GNU readline

make readline

Compile

make

Execute minishell

./minishell

Basic Minishell Features

  • Shell Syntax

    • Single Quotes : '
    • Double Quotes : "
  • Shell Commands

    • Simple Commands
    • Pipelines : |
    • Lists of Commands : &&, ||
    • Grouping Commands : (, )
  • Shell Parameters

    • Special Parameters : $?
  • Shell Expansions

    • Shell Parameter Expansion
    • Word Splitting
    • Pattern Matching : *
    • Quote Removal
  • Redirections

    • Redirecting Input : <
    • Redirecting Output : >
    • Appending Redirected Output : >>
    • Here Documents : <<
  • Executing Commands

    • Simple Command Expansion
    • Command Search and Execution
    • Environment
    • Exit Status
    • Signals : SIGINT(^C), SIGQUIT(^\)
  • Shell Builtin Commands

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

    • CDPATH
    • HOME
    • OLDPWD
    • PATH
    • PWD
    • SHLVL
  • Command Line Editing : EOF(^D)

  • History

More detail : minishell's specification


Used external functions

readline, rl_clear_history, rl_on_new_line, rl_replace_line, rl_redisplay, add_history, malloc, free, write, access, open, read, close, fork, wait, waitpid, sigaction, exit, getcwd, chdir, stat, unlink, execve, dup, dup2, pipe, opendir, readdir, closedir, strerror, perror, isatty


Author

About

Re-implemented a simple shell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published