use "trap" to remove temporary file
Rewrite hard-to-read shell oneliner