Code Fragment Collection
Web
asperix.org
Home
Contact
Categories
BASH
Shell
PHP
APL
SQL
C++
All
Documentation
License
Related
C++ Articles
APL Library
Math Library
Geo Library
mirzoyan.com
C++ Articles
Humor
Using trap do remove temporary files
Creates temporary files and uses exit trap to delete it
tmpfile=`mktemp` # ... your code is here ... trap 'rm -f $tmpfile' EXIT
Copyright (C) 2006 Andrey Mirzoyan