Hi, <div><br></div><div>Is it possible to add text before the filename when creating a new file based on template. </div><div>I would like to create a jquery.$TM_NEW_FILE_BASENAME.js</div><div>I tried to modify the script below : </div>
<div><br></div><div><div>if [[ ! -f "$TM_NEW_FILE" ]]; then</div><div> TM_YEAR=`date +%Y` \</div><div> TM_DATE=`date +%Y-%m-%d` \</div><div> perl -pe 's/\$\{([^}]*)\}/$ENV{$1}/g' \</div><div> < template_in.txt > "$TM_NEW_FILE"</div>
<div>fi</div></div><div><br></div><div><br></div><div>to something like this </div><div><br></div><div><div>if [[ ! -f "$<span class="Apple-style-span" style="font-family: monospace; font-size: medium; ">TM_NEW_FILE_DIRECTORY/jquery.</span>$TM_NEW_FILE_BASENAME.js" ]]; then</div>
<div> TM_YEAR=`date +%Y` \</div><div> TM_DATE=`date +%Y-%m-%d` \</div><div> perl -pe 's/\$\{([^}]*)\}/$ENV{$1}/g' \</div><div> < template_in.txt > "$<span class="Apple-style-span" style="font-family: monospace; font-size: medium; ">TM_NEW_FILE_DIRECTORY/jquery.</span>$TM_NEW_FILE_BASENAME.js"</div>
<div>fi</div></div><div><br></div><div>The file is correctly created but not open instantly.</div><div><br></div><div>Many thanks for your help. </div><div><br></div><div>Regards, </div><div><br></div><div>Samuel </div><div>
<br></div>