For creating temporary files with unique names, there’s the hard way and then there’s the easy way.
I would have left a comment about this on a little stupid blog, but the comments were closed, so I’m making this entry in the hopes that Google’ll pick it up and show it to someone like I was a minute ago, forgetting the name of mktemp.