Writing to a temporary file with M4

214 views Asked by At

M4 has a command maketemp which generates a random temporary file. However, what I can't figure out is how you're supposed to write to this file.

1

There are 1 answers

0
uzsolt On BEST ANSWER

I hope it's what you want.

define(_FILE,maketemp(`/tmp/m4.XXXXXX'))                                  
Created file is _FILE                                
esyscmd(`echo foo > ' _FILE)