Projects / 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 | tmpf gv (equivalent to: gv Despite the incredible simplicity of this script, there is nothing quite like it provided among the standard Unix tools.

Operating Systems

Recent releases

  •  04 May 2007 22:58

    No changes have been submitted for this release.

    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).


    Project Spotlight


    A Fluent OpenStack client API for Java.


    Project Spotlight

    TurnKey TWiki Appliance

    A TWiki appliance that is easy to use and lightweight.