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

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

    Screenshot

    Project Spotlight

    OpenStack4j

    A Fluent OpenStack client API for Java.

    Screenshot

    Project Spotlight

    TurnKey TWiki Appliance

    A TWiki appliance that is easy to use and lightweight.