Excited to share a deep dive into my latest project: a custom, fully POSIX-compliant Java Mini Shell! 💻 This project demonstrates a robust understanding of operating system interfaces and low-level command processing, all built on modern Java. ✨ Current Features This shell provides core functionality comparable to standard terminal environments: Built-in Commands: Essential commands are implemented natively, including exit, echo, type, pwd, and cd (which supports absolute paths and the home directory shortcut ~). External Execution: It successfully searches the system's PATH to find and execute external programs (e.g., ls, grep). Command Pipelines: Supports complex command chaining using the pipe operator (|), routing the standard output of one command to the standard input of the next. I/O Redirection: Comprehensive support for redirecting or appending standard output (>, >>, 1>, 1>>) and standard error (2>, 2>>) to files. 🛠️ Technology Stack & Supported Devices The project is built on Java Development Kit (JDK) 25 and uses Apache Maven for dependency management. As a Java application, it is inherently cross-platform. We currently include dedicated launcher scripts for: POSIX Systems (Linux, macOS, etc.) via Shell.sh. Windows via Shell.bat. But currently some external commands do not work on windows due to some logical differences between Windows and Linux but will be solved in sometime. 🚀 Future Goals While the current version is functional and robust, the roadmap includes adding more advanced shell capabilities to enhance its utility: Variable Expansion: Implementing support for shell variables and environment variable substitution (e.g., $HOME, $USER). Job Control: Adding support for background process management, allowing commands to be run asynchronously (&) and controlled with fg/bg. Scripting Control Flow: Introducing structures like if, else, and while loops to enable basic shell scripting within the environment. I'm incredibly proud of the work on this project and excited to see how it develops! Feel free to leave a comment with your thoughts or suggestions! #Java #ShellProgramming #POSIX #SoftwareDevelopment #OpenSource #JDK25

To view or add a comment, sign in

Explore content categories