Coder Social home page Coder Social logo

mux's Introduction

mux

Like tmux but without the t

mux is a terminal command multiplexer. It tries to be compatible with xargs; it accepts the same flags and syntax.

The big difference is that mux runs all commands in parallel, in separate pseudo-terminals. As such, it can be used to replace tools such as cluster-ssh and tmux for the use-case where you want to run lots of commands in parallel and give them the same input.

mux was written for my personal use in my free time, and as such there is not a super huge focus on code quality or testing. The tool is pragmatic and tries to cover common use-cases.

screenshot

Installation

Install Rust, then:

$ rustup toolchain add nightly-2019-03-11
$ cargo +nightly-2019-03-11 install --git https://github.com/dflemstr/mux.git

Make sure that ~/.cargo/bin is in your PATH (rustup usually sets this up automatically).

Simple usage

Running echo '1 2 3' | mux command arg1 arg2 will start command arg1 arg2 1, command arg1 arg2 2 and command arg1 arg2 3 in parallel.

You use Ctrl+T to exit the GUI that pops up.

See mux --help for more info.

Examples

$ cat hosts.txt
m1.example.com
m2.example.com
m3.example.com
m4.example.com
# Starts the 'uptime' command using 'ssh' on all hosts in parallel.
$ mux ssh '{}' uptime < hosts.txt

mux's People

Contributors

dflemstr avatar klemmm avatar nusic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mux's Issues

What's the license?

I noticed that this repository has no license, either here or on crates.io. This is unforatunte, since it is not legal for anyone else to use it unless it has a license. The Apache and MIT licenses are common for Rust crates, presumably to allow easy use in all projects (inducing commercial projects). Note, however, that I'm not a lawyer and this is not legal advice.

Heads-up: UB due to misuse of mem::uninitialized will soon lead to panic

Here, this crate causes UB by "Producing an invalid value". Concretely, it produces a value of type char with mem::uninitialized(), but char must always be a valid codepoint. In the near future the call to mem::uninitialized() will panic to avoid UB, and our crater run determined that this crate will be affected.

mem::uninitialized() is deprecated since Rust 1.39. The intended replacement is MaybeUninit, which tracks the possibility of uninitialized values at the type level to make sure the compiler does not make any false assumptions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.