https://github.com/shakibamoshiri/rinp
Simple, Beautiful, Modern; "Run in Parallel" CLI
https://github.com/shakibamoshiri/rinp
multi-command rinp run-in-parallel xargs
Last synced: 6 months ago
JSON representation
Simple, Beautiful, Modern; "Run in Parallel" CLI
- Host: GitHub
- URL: https://github.com/shakibamoshiri/rinp
- Owner: shakibamoshiri
- License: gpl-3.0
- Created: 2018-01-29T08:27:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-03T08:36:00.000Z (over 7 years ago)
- Last Synced: 2025-04-15T01:51:53.498Z (6 months ago)
- Topics: multi-command, rinp, run-in-parallel, xargs
- Language: C
- Size: 230 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
welcome to a Simple, Beautiful, Modern CLI application
for running multi-commands in parallel.
usage
⚫ usage
⚪ screenshot
⚪ examples
⚪ goal
⚪ bottom
⚪ top
1. `git clone https://github.com/k-five/rinp`
2. `cd rinp/src/`
3. `make build`sample output after `make build`
```
build mode:
compile: main.c rinp.c... okay
linking: main.o rinp.o... okay
Now you can install it by: sudo cp rinp /usr/bin/
"sude" is for root privilege. Use your own.
```
screenshot
⚪ usage
⚫ screenshot
⚪ examples
⚪ goal
⚪ bottom
⚪ top
Here is a screen-shot of running **10** `sleep` commands simultaneously. One of them is failed and others are succeeded.
examples
⚪ usage
⚪ screenshot
⚫ examples
⚪ goal
⚪ bottom
⚪ top
As a quick start, you can use `echo -e` command. `-e` is for handing special characters like newline (= `'\n'`) and so on.
- `echo -e '1\ntwo\n3' | rinp -le sleep` runs **3** `sleep` commands which 1 of them is failed and the other two are succeed.
- `echo -e '1\n\n\n\n | rinp -le sleep` runs only one `sleep` command, because newlines are ignored when they are just empty lines.If you liked to see behind the scene then try using `watch` command as follows:
`watch -n 1 -exec ps --forest -g -p process-id-of-your-terminal`
for watching all the children of your Terminal every 1 second. You will face something like this:
goal
⚪ usage
⚪ screenshot
⚪ examples
⚫ goal
⚪ bottom
⚪ top
This app is suitable for running muilt-lengthy commands that you do NOT want to see their outputs. I had a lot of `.mp4` files
that should be converted to `.mp3`. Of course I could use `xargs` with redirection (= `&> /dev/null`), but I also liked to see
if the commands are failed or succeeded.
Plus practicing some advanced techniques in `C` and `Linux Programming` that I have learned and some tiny of UI/UX.
I daily use it for:`ls *.mp4 | rinp -le ffmpeg -i {} {}.mp3`
which converts `mp4` files to `.mp3`s. Of course you can use it for `cp` or `mv` or anything you like.
I also tried to add some comments to the code, so you can read it as an educational code.
license
⚪ usage
⚪ screenshot
⚪ examples
⚪ goal
⚫ bottom
⚪ top
rinp copyright © 2017 Shakiba
▒█▀▀█ ▒█▀▀█ ▒█░░░ █▀▀█
▒█░▄▄ ▒█▄▄█ ▒█░░░ ░░▀▄
▒█▄▄█ ▒█░░░ ▒█▄▄█ █▄▄█