Skip to content

A partial recreation of the bash shell, written in C, done as group project at Hive Helsinki

Notifications You must be signed in to change notification settings

henpatsi/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

A partial recreating of the bash shell, written in C. This was a group project done at Hive Helsinki with taoramo.

Installing

Clone the repository and make.

The readline library must be installed and its location correctly defined in the Makefile file (includes and readline variables).

Running

The shell can be ran in interactive mode:

./minishell

or with single commands:

./minishell -c [command]

Implemented functionality

  • Run any executables based on the environment variable PATH, an absolute path, or a relative path.
  • Expands environment variables ($ VAR_NAME), exit status ($?), and wildcards (*).
  • Handles single and double quotes, with only the meta-character '$' being interpreted in double quotes.
  • Redirections >, <, >>, and <<, with the ability to redirect from the given fd (e.g. 2>out).
  • Command piping with |.
  • && and || for linking multiple commands.
  • ctrl-C, ctrl-D and ctrl-\
  • A memory of commands run in the interactive shell.
  • Built ins:
    • echo with option -n
    • cd with only a relative or absolute path
    • pwd with no options
    • export with no options
    • unset with no options
    • env with no options or arguments
    • exit with no options

About

A partial recreation of the bash shell, written in C, done as group project at Hive Helsinki

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published