Projects | Bon & Jason's Shell (BJSH)
Skip to main content

Bon & Jason's Shell (BJSH)

BJSH is a *NIX shell providing an interactive command-line interface similar to other Unix-like shells. (e.g., bash, zsh)

Visit website
  • C Programming
  • Shell Development
  • System Programming
  • Command-line Interface

Introduction

BJSH (Bon & Jason's Shell) is a custom-built *NIX shell program developed from scratch as part of the 42 curriculum. This lightweight, interactive command-line interface replicates core functionalities of popular Unix-like shells (e.g., bash, zsh) while maintaining efficiency and simplicity.

The birth of Bon & Jason's Shell (BJSH)!

Initially, Bon and Jason, two friends with a shared love for coding and memes, considered creating a programming language called "Bon and Jason Programming Language" with the file extension .bj.

However, upon discovering the Minishell project at 42, they decided to collaborate on creating their own shell instead, naming it "Bon and Jason's Shell" or BJSH for short.

Features

  • Command Execution: Executes commands using PATH variables or absolute/relative paths
  • Input/Output Redirection: Supports <, >, <<, and >> operators
  • Piping: Implements | for connecting multiple commands
  • Environment Variables: Handles environment variables and $? for last exit status
  • Signal Handling: Custom handling for Ctrl-C, Ctrl-D, and Ctrl-\
  • Quote Handling: Correctly interprets single and double quotes
  • Built-in Commands: Implements echo, cd, pwd, export, unset, env, and exit
  • Command History: Maintains a history of executed commands
  • Here Documents: Supports here-doc functionality
  • The Result

    Developing BJSH was a challenging yet rewarding experience that significantly improved my systems programming skills. Working on BJSH alongside Jason was an incredible experience. We learned so much about tokenization, processes, file descriptors, and system calls in C. We made sure to follow all the project guidelines, avoid crashes and memory leaks by managing memory properly, and maintain good coding practices.

    We successfully met all the requirements, and BJSH turned out to be a solid shell. This project sharpened our technical skills and proved we can handle complex programming tasks together. BJSH is a proud addition to our portfolios.

    View on Github