Skip to content

omarse7a/simple-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-shell

Java Version

A lightweight Unix-like shell emulator built in Java, supporting essential commands and operators. This project provides a simple and extensible CLI environment for practicing shell commands.

Features

1. Commands

  • pwd: Print the current working directory.
  • cd: Change working directory to a specified path.
  • ls: List files in the current directory, can take extra options as arguments:
    • -a Include hidden files.
    • -r Reverse order listing.
  • touch: Create a file with each given name or update its last modification time.
  • rm: Delete each given file.
  • echo: Write text to the shell.
  • cat: Concatenates and prints files. If no files are specified, reads from user input and echoes it.
  • mkdir: Create a directory for each given name.
  • rmdir: Deletes each given directory, only if it is empty.
  • mv: Move/rename files or directories.

2. Operators

  • >: Redirect the output of the first command to be written to a file. (creates file if it doesn't exist)
  • >>: Redirect the output of the first command to be appended to a file. (works only if file exists)
  • |: Redirect the output of the left command as in input to the right command.

3. Internal Commands

  • exit: Terminate the shell.
  • help: List all supported commands and how to use them.

About

A simplified implementation of Unix-like shell in java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages