Skip to content

dgsh compatible programs

Marios Fragkoulis edited this page Sep 27, 2017 · 3 revisions

Examples of dgsh-compatible programs

The following are some interesting dgsh-compatible programs.

  • scatter: multiple outputs

  • gather: multiple inputs

  • paste: multiple inputs

  • comm: 2 inputs, up to 3 outputs (file1, file2, both)

  • grep: multiple inputs, multiple outputs

    Flags configure the following output channels. The outputs will be provided in the order of the arguments passed.

    • matching line where pattern is found (with no arguments, e.g., echo hi | grep hi)
    • matching line where pattern is found (--matching-lines for combining with other output channels)
    • count of matches (-c)
    • matching files (-l)
    • non-matching files (-L)
    • matching part of line (-o)
    • non-matching lines (-v)

    The following combinations of output channels are supported in any order (all combinations and orders have been tested ):

    • --matching-lines -c
    • --matching-lines -l
    • --matching-lines -L
    • -c -l
    • -c -L
    • -l -L
    • --matching-lines -c -l
    • --matching-lines -c -L
    • -c -l -L
    • --matching-lines -c -l -L
  • parallel: n inputs

  • diff: 2 inputs

  • join: 2 inputs

  • awk: multiple inputs (specified in the predicate)

  • sed: multiple outputs (as arguments to a modified w command)

  • sort: -m: multiple inputs

  • tar: up to two outputs (-cf - and -v)

  • dgsh-wrap app [args ...]: Can package an arbitrary program to make it dgsh-compatible so that they can take part in the negotiation.

Although any program taking multiple files as arguments could be made to receive multiple dgsh inputs, doing so would provide excessive flexibility to negotiations without providing commensurate utility.