Skip to content

Yunchia-Hsu/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

Minishell is my first group project at Hive to build a simple bash-like shell at Hive Helsinki with allihive

  • we are asked to use our own C library (libft folder) as part of the practice.

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

1. The shell can be ran in interactive mode:

./minishell

2. run one command:

[command] eg. ls

or with pipes:

[command] | [command] eg. ls | grep "happy"

Implemented functionality

  • Run ./minishell to add shell level
  • 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

42_minishell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published