Skip to content

KevinB2212/myshell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐚 MyShell

A custom Unix shell built from scratch in C

About

A fully functional Unix shell implementation written in C as part of DCU's Operating Systems module (CA216). Supports internal commands, external program execution, I/O redirection, piping, and background processes.

Features

  • Built-in commands: cd, clr, dir, environ, echo, pause, help, quit
  • I/O redirection: Input (<) and output (>, >>) redirection
  • Background execution: Run processes in the background with &
  • Environment variables: Full environment variable support
  • Manual pages: Built-in help documentation

Project Structure

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ myshell.c      # Main shell loop & command parsing
β”‚   β”œβ”€β”€ myshell.h      # Header file & function declarations
β”‚   β”œβ”€β”€ utility.c      # Utility functions & built-in commands
β”‚   β”œβ”€β”€ utility.h      # Utility header
β”‚   β”œβ”€β”€ makefile       # Build automation
β”‚   └── help.txt       # Built-in manual page
└── manual/            # Documentation

Build & Run

cd src
make           # Compile
./myshell      # Run the shell

Usage

myshell> echo Hello World
Hello World

myshell> dir /home
...

myshell> ls -la > output.txt    # Output redirection

myshell> sleep 10 &             # Background execution

myshell> help                   # View manual

Tech Stack

  • Language: C
  • Build: Make
  • Platform: Unix/Linux

Author

Kevin β€” Dublin City University


DCU CA216 β€” Operating Systems

About

🐚 Unix shell built from scratch in C β€” built-in commands, I/O redirection, piping & background execution

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors