Projects / tmpf

tmpf

Tmpf is tiny script (written in Ruby) to write standard output to a temporary file, run an application with the name of that file as an argument, then delete the temporary file when done. This is useful when you want to pipe output to a program that only accepts files, not standard input. Example: cat myfile.ps | tmpf gv (equivalent to: gv myfile.ps). Despite the incredible simplicity of this script, there is nothing quite like it provided among the standard Unix tools.

Tags
Licenses
Operating Systems
Implementation

RSS Recent releases

  •  04 May 2007 15:58

No changes have been submitted for this release.

RSS Recent comments

05 May 2007 00:31 gvy

as much as I like Ruby...
incredibly simple scripts are better in shell. :)

e.g. while read line; do echo $line; done instead of input.readlines.each do ... end; there's also mktemp(1).

To avoid having an (unneeded) shell hanging around folks tend to use exec cmd instead of final cmd (implying a return followed by normal exit).

Screenshot

Project Spotlight

sslh

A server-side multiplexer for SSL, SSH, OpenVPN, tinc, and XMPP.

Screenshot

Project Spotlight

123 Flash Chat Moodle Module

A chat room module for Moodle.