I want to create a temp file which is named based on a search string. The search string may contain spaces or characters that aren't supposed to be used in filenames so I want to strip those out.
My thought was to use 'tr' with [:alnum:] but the result is the opposite of what I want:
In this case the files being generated are containers for "previous run" search statistics that are located in /tmp. This script will not be ported and the files never copied off so it's not an issue.
That being said, I am working on some other stuff where it will matter and it will be important to keep this in mind. Thanks for the tip!