Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐚 Minishell

Minishell is a simple implementation of a terminal shell, allowing you to execute commands, use pipes, and navigate directories. It supports running system programs and implements basic shell functionalities.

Compilation and Execution

To compile Minishell, simply run:

make

This will generate the executable file minishell.
Now, to start the shell, run:

./minishell

Features Implemented

Execution of system commands
Input and output redirection (<, >, >>)
Pipe support (|)
Built-in commands (cd, exit, pwd, echo)

Using Minishell

You can use system commands like:

ls -l

Or provide the absolute path of the command:

/bin/ls -l

🔹 Using Pipes (|)

Minishell supports chaining commands using pipes:

cat README.md | grep shell

🔹 Input and Output Redirection

Redirecting the output of a command to a file:

ls > file_list.txt

Reading input from a file:

cat < file_list.txt

Appending output to a file without overwriting:

echo "New line" >> file.txt

Built-in Commands

Minishell also implements some built-in commands, which do not require execve():

Command Description
cd <directory> Changes to the specified directory
pwd Displays the current directory
echo <text> Prints the text to the screen
exit Closes Minishell

About

This is an implementation of a simple terminal shell.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages