https://github.com/tsatke/lprefix
A small tool to prefix lines in a script.
https://github.com/tsatke/lprefix
Last synced: 3 months ago
JSON representation
A small tool to prefix lines in a script.
- Host: GitHub
- URL: https://github.com/tsatke/lprefix
- Owner: tsatke
- License: mit
- Created: 2021-08-17T11:06:37.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-17T11:22:19.000Z (almost 4 years ago)
- Last Synced: 2025-03-03T19:46:07.823Z (3 months ago)
- Language: Rust
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lprefix
A small tool to prefix lines in a script.---
While using `xargs`, I found it hard to use `sed` to prepend something to lines in the output because of its regex interpretation.
That's why I hacked this together.## Install
```shell
cargo install lprefix
```## Example
Example of how I use it:
```shell
forall () {
local P=${P:-1}
local ARG="cd {} ; pwd ; $@"
find . -type d -depth 1 -maxdepth 1 | xargs -n 1 -P ${P} -I {} bash -c "$ARG | lprefix '{}'"
}
```