MySH is a lightweight Linux shell implemented in C++. It provides basic shell functionalities, including command execution, input/output redirection, piping, background processes, and command aliasing. Additionally, it includes a custom command history feature for convenience.
- Command Execution: Supports standard Linux commands using
execvp
. - Input/Output Redirection: Redirect input/output using
<
,>
, and>>
. - Piping: Supports single pipes (e.g.,
ls | grep txt
). - Background Processes: Execute commands in the background using
&
. - Command Aliases: Create and manage command aliases with
createalias
anddestroyalias
. - Command History: View and execute previous commands using
myHistory
.
- Clone the repository:
git clone https://github.com/yourusername/mysh.git cd mysh
- Compile the code:
g++ -o mysh main.cpp shell.cpp -std=c++17
- Run the shell:
./mysh