S3E.sh is a minimalistic, shell-based text editor designed for environments where traditional editors like nano, vi, or vim may not be available or functional. Whether you're working on a headless system, in a containerized environment, or with restricted binaries, S3E.sh offers an easy-to-use alternative to quickly create and edit text files directly from the command line.
s3e_busybox.sh is a even more minimalistic script rewritten in ash and compartibel for embedded systems like firetv adb shell or busybox systems..
While tools like nano, vi, and vim are ubiquitous in Unix-based systems, there are situations where they are either unavailable or impractical. S3E.sh fills this gap by offering a simple, lightweight text editor that works anywhere a bash shell is available. Some of the scenarios where this tool shines include:
- Headless systems (e.g., remote servers, IoT devices)
- Containers with minimal setups (e.g., Docker containers)
- Environments with no access to external binaries (e.g., restricted servers)
S3E.sh is the go-to editor when you need to manage text files on systems with minimal resources or when installing complex text editors is not feasible.
- Add Multiple Lines: Add multiple lines of text to your file in one go.
- Delete Lines: Easily delete a specified range of lines.
- Replace Lines: Replace any range of lines with new text.
- Safe Editing: Preview changes before saving to avoid accidental data loss.
- Portability: Works anywhere bash is available, without needing external binaries.
- Minimalistic: No complex setup or external dependencies required.
To get started, simply download or clone the repository and make the script executable:
git clone https://github.com/suuhm/s3e.sh
cd s3e.sh
chmod +x s3e.shRun the editor with the desired file path as an argument:
./s3e.sh myfile.txtIf the file does not exist, it will be created automatically. Then, you can add, delete, or replace lines in the file.
- Add Lines: Input multiple lines of text to append to the file. Type
EOFon a new line to finish. - Delete Lines: Specify a range of lines (e.g.,
3-5) to delete. - Replace Lines: Choose a range of lines to replace with new text.
- Save & Exit: Save your changes and exit the editor.
- Exit Without Saving: Exit the editor without saving changes.
-
Start the editor:
./s3e.sh myfile.txt
-
Choose an option (e.g., Add Lines, Delete Lines, etc.).
-
Perform your edits:
- Add lines with
Add Lines. - Replace or delete lines with
Replace LinesorDelete Lines.
- Add lines with
-
Save & Exit once you're done editing.
- Lightweight: Perfect for minimal environments where full-featured editors aren't available.
- No External Dependencies: S3E.sh works out of the box with no need for complex installations or third-party binaries.
- Easy to Use: Simple command-line interface for quick text editing without distractions.
- Highly Portable: Works on almost any system where bash is available, making it ideal for servers, embedded systems, and containers.
- No Hassle: No need for configuration, just download the script, make it executable, and you're ready to go.
- Minimalist systems: On devices with limited resources where installing full editors like
nanoorviis impractical. - Headless environments: For remote servers or cloud-based instances where text editors aren't installed.
- Restricted systems: When you're working with systems that don't allow the installation of external binaries.
- Scripting: Perfect for situations where you need to modify text files from within a shell script but don't have access to a full-featured text editor.
If you'd like to contribute to the development of S3E.sh, feel free to fork the repository, submit issues, and create pull requests. This project is open-source and contributions are welcome to improve and enhance it.
This project is licensed under the MIT License - see the [LICENSE] file for details.
The name S3E.sh stands for Simple Small Shell Editor. It reflects the tool’s purpose: a simple and small editor designed to be used in shell environments with minimal resources. S3E.sh is a lightweight, no-frills alternative to traditional text editors, making it perfect for low-resource systems and environments where other editors might not be available.
-
Start the editor:
./s3e.sh myfile.txt
-
Select the action:
- Add lines:
Add Lines - Replace lines:
Replace Lines - Delete lines:
Delete Lines
- Add lines:
-
Save and exit: After editing, save and exit the editor.