Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am lincheney on github.
  • I am lincheney (https://keybase.io/lincheney) on keybase.
  • I have a public key ASCb0332DhUChseRNFMQBqSX6VIyKNZAKoZvAKy76X1dCQo

To claim this, I am signing this object:

@lincheney
lincheney / input-multiplexer.rb
Last active February 4, 2016 04:22
SIGKILL cannot be trapped
# input-multiplexer.rb stdout=file1 stdout=name_2=file2 stderr=name_3=file3 ...
# Merges the specified files together into stdout or stderr (as specified)
#
# Example output:
# file1| first line from file1
# file1| the next line from file1
# name_3| first line from line3
# name_2| first line from line2
# file1| the next line from file1
# ...