rust-rwcat is a Rust-written cat-styled program that provides commands for reading and appending to files.
- Read:
- Read the entire file.
- Query specific lines containing a keyword.
- Write:
- Append a string to a file.
- Automatically creates the file if it doesn't exist.
Clone the repository and compile the project using Cargo:
git clone https://gitlab.com/Katacc/rust-rwcat.git
cd rust-rwcat
cargo build --releaseThe executable will be located in the target/release/ folder. Rename it if desired and add it to your PATH for global usage.
rwcat read <file_path> [query]- Example 1: Read the entire file:
rwcat read test.txt - Example 2: Query lines containing "test":
rwcat read test.txt test
rwcat write <file_path> <content>- Example: Append a string to a file:
rwcat write test.txt "This string will be appended to the text file"
Note: If the file does not exist, it will be created automatically.
This project is licensed under the GNU Affero General Public License v3. See the LICENSE file for details.
For questions or feedback, please open an issue on the GitLab repository.