Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nova Shell

A simple Unix-like shell implemented in C. It supports command execution, pipelines, redirection, background execution, and built-in commands like cd, exit, clear, help, history, set, and unset.

Requirements

  • GNU Readline Library
    • On Ubuntu, install it with:
      sudo apt-get update
      sudo apt-get install libreadline-dev
      
  • GCC Compiler

Features

  • Prompt: Displays the current user and working directory.
  • Command Parsing:
    • Pipelines (|)
    • Input (<) and output (>) redirection
    • Background execution (&)
    • Quoted arguments and environment variable expansion ($VAR)
  • Built-in Commands:
    • cd: Change the current directory.
    • exit / bye: Exit the shell.
    • clear / cls: Clear the terminal.
    • help: Display help information.
    • history: Show command history.
    • set VAR=value: Set an environment variable.
    • unset VAR: Unset an environment variable.
  • History Support: Command history is managed with GNU Readline.
  • Error Handling: Syntax and execution errors are reported to the user.

Build and Run

Compile and run the project with the following command:

g++ nova.c main.c -o nova -lreadline && ./nova

Usage

When you run Nova Shell, you'll see a welcome banner and a prompt displaying your current directory. You can then type commands as in any Unix shell. For example:

  • List files:
    ls -l
    
  • Execute a pipeline:
    ls | grep "txt"
    
  • Redirect output:
    ls > files.txt
    
  • Run a background process:
    sleep 10 &
    

To see all available commands, type help.

License

This project is released under the MIT License.

Author

Imran AKKI

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages