toys

Tools and things that make my life easier - y'all might like them too

View the Project on GitHub pfuntner/toys

pipeit

Purpose

Sends piped/redirected output to/from a file on a remote system

Syntax

Syntax: pipeit [--verbose] system:path

Positional arguments

| Argument | Description | Default | | —— | ———– | ——- | | dest | Source/destination in form system:path | This is a required argument and there is no default |

Options

| Option | Description | Default | | —— | ———– | ——- | | -v | Enable verbose debugging | Debugging is not enabled |

Examples

Writing example

$ head -c10000 /dev/random > random
$ md5sum random
0bed19ac814a70a23065ac4842badc75 *random
$ ls -lh random
-rw-r--r-- 1 mrbruno mrbruno 9.8K Sep 15 15:44 random
$ pipeit ubuntu:/tmp/random < random
$ ssh -q ubuntu md5sum /tmp/random
0bed19ac814a70a23065ac4842badc75  /tmp/random
$

Note: Since /dev/random produces random data, your mileage will vary - the checksum will be different but the amount of data is the same.

Reading example

$ cat /dev/random | head -c10000 | pipeit vm1:/tmp/random
$ ssh vm1 md5sum /tmp/random
57adc4d45553de79f2ce5c6925b2ccdc  /tmp/random
$ pipeit vm1:/tmp/random | md5sum

57adc4d45553de79f2ce5c6925b2ccdc  -
$ 

Notes