Crates.io | rd |
lib.rs | rd |
version | 0.2.0 |
source | src |
created_at | 2021-06-15 10:03:57.569767 |
updated_at | 2021-08-13 05:31:03.250934 |
description | simple utils to replace and delete text in text files |
homepage | |
repository | |
max_upload_size | |
id | 410330 |
size | 56,044 |
Very simple utility to replace(r)/delete(d) strings in text files
cargo install rd
rd "replace" "with" -f file.txt
by default, it uses regex, for string literals
rd -s "replace" "with" -f file.txt
rd "replace" "with" -f file.txt -i
rd "to_delete" -f file.txt -d
rd "replace" "with" -f *.txt
with fd
rd "replace" "with" -f $(fd '.*\.txt')
Much faster than GNU sed (2x), but slower than sd (2x) for large files. Similar to sd for small files