bin
my bins (mostly shell scripts) (by denisde4ev)
forkrun
runs multiple inputs through a script/function in parallel using bash coprocs (by jkool702)
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bin
Posts with mentions or reviews of bin.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-05.
-
Out of curiosity, what is your best script you can showcase?
btw boo is for testing if u'r root
forkrun
Posts with mentions or reviews of forkrun.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-03-11.
- Forkrun: Runs multiple inputs through a command in parallel using bash coprocs
- Forkrun – A pure-bash function for parallelizing loops
-
rparse: an easy-to-use shell script/function option parser that uses regex to determine which inputs are options
EDIT: moved code + example to GITHUB
-
[BASH] Can I use procfs to change the file that a backgrounded process is writing data to?
One example that I dont know how to do streaming for involves breaking up the stdin stream and sending it to different places, but where you determine where to send it in realtime. This isnt the code that spawned this particular thread, but a good example of this is in this function I wrote called forkrun.
-
Optimizing bash scripts?
If you want an example of a really optimized bash script check out my forkrun utility. I spent a really long time optimizing it. It parallelizes loops (like xargs -P and parallel), and for problems with "many very quick iterations" (e.g., sha256sum of a million tiny files) it is twice as fast as the fastest method available via xargs or parallel (which means it is outpacing well optimized compiled C/C++ binaries).
-
Bash continuous parallelization
as it so happens, I recently wrote a script called forkrun that parallelizes loops really fast. In particular for things like your simulation that require running 1 at a time in parallel (N parallel batches of 1 simulation, as opposed to N parallel batches of M simulations) the parallelization framework itself is 7x faster than xargs -l 1 -P N and ~25x faster than parallel -j N.
-
Globals or not globals?
However, if you have bash 4 or later, using bash coprocs can offer much better performance. The idea is that you spawn a bunch of persistent coprocs and pipe data to them, allowing you to parallelize the loop without forking each individual iteration. I wrote / am writing a utility called forkrun that parallelizes loops using bash coprocs. You're welcome to use it, though heads up it is still in beta (almost everything works, but I am still debugging the -k flag sometimes not working properly...-k ensures the output order is the same as input order). If nothing else it gives a real world example of parallelizing using coprocs.
-
Can you force bash to not give a throw a specific error?
Side note: in case you were wondering the actual code that inspired this post is my forkrun utility. If you felt like checking it out Id love to hear any feedback you might have on it.
-
Out of curiosity, what is your best script you can showcase?
For me? My personal best script is (by a wide margin) my forkrun utility. It uses bash coprocs to efficiently parallelize loops. Usage is nearly identical to xargs -P <#>. Options are similar to xargs....a few are missing (namely those related to running things interactively), and a few options are things xargs doesnt do but forkrun can.
-
How can I run commands in parallel and write the output of each command to different linux terminals, one linux terminal for each command running in parallel.
I wrote a nifty function for parallelizing loops in bash really fast called forkrun. It will, with the help of tail -F, let you do this (among many other things) by writing the output from each parallel worker to a separate file, which you can then monitor in real time with tail -F in another terminal window.
What are some alternatives?
When comparing bin and forkrun you can also consider the following projects:
pkm - A super minimal TUI package manager wrapper written in BASH v4.2+
arg - usage: arg [...args]; output: (count of args):(len of args) (...quoted arguments)
resholve - a shell resolver? :) (find and resolve shell script dependencies)
dyetide - a bash script that replaces hex, rgb, or hsl color codes out for other color codes. either within a file or from the terminal!
fml - :card_index_dividers: A stupid simple, fast TUI file manager written in BASH v4.2+
wgs - A minimal wallpaper getter setter
dun - Meeting notes and todo tasks CLI