Edit

kmx.io/runj

Branch :

  • Properties
  • Git HTTP https://git.kmx.io/kmx.io/runj.git
    Git SSH git@git.kmx.io:kmx.io/runj.git
    Public ? true
    Name
    Description

    Run a command in multiple sub-processes with line-buffered I/O.

    Github

    Codeberg

    Users thodg
    Tags

  • README.md
  • # runj v0.1
    
    Run a command with multiple processes.
    
    ## Example
    
    Try this to clean-up space on your hard drive (choose NVme for faster
    speed).
    
    ```sh
    # cd / && find -d -print0 | runj 8 xargs -0 rm -f
    ```
    
    This will run 8 parallel `xargs -0 rm -f` processes.
    
    Try this to speed up any shell script (warning, do not try this at home
    or on Linux) !
    
    ```sh
    runj < MyScript.sh 32 sh -c
    ```
    
    This will run sh full speed on your 32 core server.
    
    More seriously, I needed to speed up my test infrastructure which is
    shell-based and want to run commands in parallel. -1 will use all the
    available cores.
    
    ```sh
    runj < tests -1 ./test-runner
    ```
    
    Simple as that and MP-safe.