[TxMt] context output to html

Sune Foldager cryo at cyanite.org
Wed Apr 6 16:36:14 UTC 2005

On 06-04-2005, at 11:11, Allan Odgaard wrote:

> The “[ -s <file> ]” tests for the existence of <file> AND that <file> 
> has a size greater than 0. If this condition is true, it will perform 
> the echo and output the redirect-line. A more verbose version would 
> be:
>    if [ -s ${tmp}.pdf ]; then
>       echo '</pre><meta http-equiv="Refresh" 
> content="0;URL=file:///'${tmp}'.pdf">'
>    fi
> (I'm misusing the lazy/short-cut nature of the && operator as an 
> if-statement)

This is so common as to almost be the-way-to-do-it(tm) :-p. Actually, 
didn't I alter this part of the script? Hmm.. don't remember, but I use 
that short-cut stuff as well.


More information about the textmate mailing list