Skip to content

kaoutar-12/Mini_Shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell 🐚

A small Unix shell written in C as part of the 42 curriculum.
Minishell replicates basic shell functionality, including command execution, pipes, redirections, and built-in commands.


Features ✨

  • Execute commands with arguments
  • Built-in commands:
    • echo, cd, pwd
    • export, unset, env, exit
  • Input/Output redirections: <, >, >>
  • Pipes |
  • Environment variable expansion $VAR
  • Signal handling: Ctrl+C, Ctrl+D
  • Optional: heredoc (<<) support

Usage 💻

Example commands:

$ echo "Hello Minishell"
Hello Minishell

$ cd /tmp
$ pwd
/tmp

$ ls -l | grep ".c"
main.c
utils.c

$ export NAME=Kaoutar
$ echo $NAME
Kaoutar

Redirections:

$ echo "Hello" > file.txt
$ cat < file.txt
Hello

$ cat << EOF
> This is heredoc
> EOF
This is heredoc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published