Skip to content

Katacc/rust-rwcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

rust-rwcat

GitLab pipeline status GitLab license

rust-rwcat is a Rust-written cat-styled program that provides commands for reading and appending to files.


Features

  • 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.

Installation

Clone the repository and compile the project using Cargo:

git clone https://gitlab.com/Katacc/rust-rwcat.git
cd rust-rwcat
cargo build --release

The executable will be located in the target/release/ folder. Rename it if desired and add it to your PATH for global usage.


Usage

Read from a file

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

Write to a file

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.


License

This project is licensed under the GNU Affero General Public License v3. See the LICENSE file for details.


Contact

For questions or feedback, please open an issue on the GitLab repository.

About

Rust written cat, grep, append type of tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages