dmptmp
dmptmp
creates a tempfile and writes stdin
to it.
Installation
go install github.com/broothie/dmptmp
Usage
$ echo Hello, World | dmptmp
/var/folders/p_/hbkf2rp10v983_x34cw14svr0000gn/T/4020381166
$ cat /var/folders/p_/hbkf2rp10v983_x34cw14svr0000gn/T/4020381166
Hello, World
Help
$ dmptmp -h
dmptmp
dmptmp creates a new temporary file in the directory --dir.
The filename is generated by taking --pattern and adding a random string to the end.
If pattern includes a "*", the random string replaces the last "*".
If dir is the empty string, dmptmp uses the default directory for temporary files.
Usage of dmptmp:
-dir string
Directory in which to create temp file
-pattern string
Pattern for constructing filename