Skip to content

bakhchi/MyShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

ZASH - Homemade Linux Shell

Overview

ZASH is a minimal Unix-like shell implemented in C for Linux systems. This project was created as part of an operating systems class at Cooper Union in October 2025 (ECE-357). It demonstrates fundamental system calls and process management concepts through a functional command-line interface.

Features

  • Command Parsing: Tokenizes and executes user commands with proper argument handling
  • I/O Redirection: Supports input redirection (<), output redirection (>, >>), and error redirection (2>, 2>>)
  • Built-in Commands: Implements cd, pwd, and exit with appropriate functionality
  • Process Management: Uses fork/exec/wait to execute external commands
  • Resource Tracking: Displays real, user, and system time for each command execution
  • Scripting Support: Can read commands from files or standard input
  • Error Handling: Comprehensive error reporting for file operations and command execution

System Calls Demonstrated

  • fork() - Process creation
  • execvp() - Program execution
  • wait3() - Process synchronization with resource usage
  • dup2() - File descriptor manipulation for redirection
  • open() - File operations
  • chdir() - Directory changes
  • getcwd() - Current working directory retrieval
  • gettimeofday() - Timing measurements
  • getrusage() - Resource usage statistics

Building and Running

Prerequisites

  • Linux operating system
  • GCC compiler
  • Standard C libraries

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages