complete documentation about tempfile handling

This commit is contained in:
Jaromil 2015-03-22 10:35:09 +01:00
parent cb7517e678
commit c59ed6b7bd
1 changed files with 10 additions and 0 deletions

View File

@ -59,6 +59,16 @@ testfun() {
fn "testfun"
# print out with nice green colors
notice "Custom var: $myvar"
# create a tempfile
ztmp && mytmp=$ztmpfile
# put the value into the tempfile
print $myvar >> $mytmp
# print out the path to the tempfile
act "Temp file: $mytmp"
# print out the contents of the tempfile
act "Content: `cat $mytmp`"
# the tempfile will be deleted in endgame()
# but can also be delete earlier here, optionally
}
# wrap the init phase