Skip to content

shakibamoshiri/rinp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation






welcome to a Simple, Beautiful, Modern CLI application
for running multi-commands in parallel.



usage

⚫ usage ⚪ screenshotexamplesgoalbottomtop


  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 ⚪ examplesgoalbottomtop


Here is a screen-shot of running 10 sleep commands simultaneously. One of them is failed and others are succeeded.




examples

usagescreenshot ⚫ examples ⚪ goalbottomtop


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

usagescreenshotexamples ⚫ goal ⚪ bottomtop


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

usagescreenshotexamplesgoal ⚫ bottom ⚪ top

rinp copyright © 2017 Shakiba

▒█▀▀█ ▒█▀▀█ ▒█░░░ █▀▀█
▒█░▄▄ ▒█▄▄█ ▒█░░░ ░░▀▄
▒█▄▄█ ▒█░░░ ▒█▄▄█ █▄▄█

About

Simple, Beautiful, Modern; "Run in Parallel" CLI

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published