#!/bin/bash # tofile.sh - Create Temporary Files # Author: Sean B. Palmer, inamidst.com # Usage: ./program $(tofile ) # For systems lacking <(echo something) TMPFILE=/tmp/$$.$(date '+%s%N') if [ ! -z "$@" ] then echo -e "$@" > $TMPFILE else cat > $TMPFILE fi echo $TMPFILE # [EOF]