Creating temporary files

During operational work, you need the output of a command. You always would use it now or later. You need to store it in a temporary file . People try all sorts of things like saving it in /tmp/1 (which I always do), /tmp/11 , /tmp/12 if there are two files . I always ignore deleting them since the OS will take care of the files present /tmp/ (after reboots). 

Well, there is a better way – mktemp (on unix) or more specifically on a Mac mktemp -t b where b is any string.  

Keeping your code clean is one thing, maintaing your directories clean is the most important thing just like the shelves in your cupboard.