Crates.io | sreplace |
lib.rs | sreplace |
version | 0.9.5 |
source | src |
created_at | 2023-04-23 16:23:57.37193 |
updated_at | 2024-01-08 21:06:05.379749 |
description | A simple to use, efficient, and full-featured command line string replacer. |
homepage | https://gitlab.com/miyamoto128/sreplace |
repository | https://gitlab.com/miyamoto128/sreplace |
max_upload_size | |
id | 846663 |
size | 6,501,391 |
A simple to use, efficient, and full-featured command line string replacer.
Sed like command line tool that aims to be simple and fast to use.
This is a rewritting of a former project of mine, from C++ to rust.
sreplace
using cargo
:cargo install sreplace
The ready to use executable command is sr
.
sr <PATTERN> <REPLACEMENT> <PATH>
Arguments:
<PATTERN> The string to look for
<REPLACEMENT> The replacement string
<PATH> The path to the file or directory
$ cat hello.txt
Hello world!
$ sr world all hello.txt
Replaced 1 line in "hello.txt"
$ cat hello.txt
Hello all!
GPL v3