[TxMt] Please help with Project title $TM_ variable

Charilaos Skiadas skiadas at hanover.edu
Fri Jan 26 01:28:27 UTC 2007

On Jan 25, 2007, at 7:56 PM, Web Revolution wrote:

> Hello Haris,
> the project file has been saved but it doesn't work. Find attached  
> the template file as requested. And thank you for your kindly support!
Ok, move the two lines I suggested so that they are before the  
TM_YEAR line. It should sort of work there, except that it also adds  
the following character:

(This character appears as return on this email, and also when I try  
to paste it in TM, so not really sure what is going on, it appears as  
a little diamond for me in the template output. I guess it might be a  
\r). Perhaps someone with more knowledge of these things can help you  
out more in how to avoid getting that, and also explain to me what  
all those slashes at the end of each line in the template script are  
there for:

if [[ ! -f "$TM_NEW_FILE" ]]; then
    TM_YEAR=`date +%Y` \
    TM_DATE=`date +%d" "%b" "%Y" "@" "%I:%M" "%p" "%z` \
    TM_USERNAME=`niutil -readprop / /users/\$USER realname` \
    perl -pe 's/\$\{([^}]*)\}/$ENV{$1}/g' \
       < test.html > "$TM_NEW_FILE"


More information about the textmate mailing list