Skip to content

42-NETWORK/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minishell

minishell

Welcome to Minishell, The Giga Project developed as part of the 42 Network curriculum. Minishell is a simplified shell implementation, providing a command-line interface where users can interact with the operating system by executing various commands.

Features

Minishell comes with the following features:

  1. Command Execution: Users can execute a wide range of commands, including both built-in commands and external commands available in the system.
  2. Built-in Commands: Minishell supports several built-in commands such as cd, echo, pwd, export, and unset, which provide additional functionality.
  3. Redirection and Pipes: Minishell supports input/output redirection and pipes, allowing users to redirect command input and output streams, as well as chaining multiple commands together.
  4. Signal Handling: Minishell handles various signals such as Ctrl-C and Ctrl-\, providing a graceful termination of running commands.
  5. Environment Variables: Users can manage environment variables, set new variables, and modify existing ones using the built-in commands.
  6. Command History: Minishell provides a command history feature, allowing users to navigate through previously executed commands using the arrow keys.

Getting Started

To get started with Minishell, follow these steps:

  1. Clone the Minishell repository from the official 42 Network GitHub repository:

    git clone https://github.com/emohamedd/MiniShell.git
  2. Navigate to the project directory:

    cd minishell
  3. Build Minishell using the provided Makefile:

    make
  4. Run Minishell:

    ./minishell

Usage

Minishell provides a command-line interface where you can enter and execute commands. It supports various features and syntax that you can utilize:

  1. Executing Commands: Simply enter a command and press Enter to execute it. For example:

    ls -l
  2. Built-in Commands: Minishell supports several built-in commands. Here are a few examples: Changing the current working directory:

    cd /path/to/directory
    echo Hello, world!
    ls -l
  3. Redirection and Pipes: Minishell allows you to redirect input/output and chain commands using pipes. Here are a few examples: Redirecting output to a file:

     ls -l > output.txt

    Piping the output of one command as input to another command:

    cat file.txt | grep "pattern"
  4. Signal Handling: Minishell handles signals such as Ctrl-C and Ctrl-\ to terminate running commands or exit Minishell gracefully. Environment Variables: You can manage environment variables using the built-in commands. For example:

    export MY_VAR=my_value
    export PATH=$PATH:/new/path
  5. Command History: Minishell keeps track of command history, allowing you to navigate through previously executed commands using the arrow keys.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published