tcl - how do i make a variable unique -


how make variable unique in tcl?

example:

exec echo $msgbody - /tmp/alert_notify_work.$$ exec cat /home/hci/alert.txt -- /tmp/alert_notify_work.$$ 

this not work; trying make variable alert_notify_work unique.

it's best use pre-existing library this. tcllib has fileutil package implements tempfiles:

set filename [fileutil::tempfile alert_notify_work.] 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -