Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Deleting the file' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Deleting the file
Authored by: triplef on Nov 02, '03 03:10:48PM
If you don't want to rely on the system to remove files in /tmp, you can change the script like this to automatically remove the file 60 seconds after it has been opened. This version will to the PS to PDF conversion using pstopdf, which is - as noted above - a bit faster than Preview.
man -t $1 | pstopdf -i -o /tmp/$1.pdf
open /tmp/$1.pdf
sleep 60 && rm -f /tmp/$1.ps &


[ Reply to This | # ]
Deleting the file
Authored by: pualo2 on Nov 02, '03 04:58:50PM
Might want to change that. You are saving a .pdf file but trying to delete a .ps file. Change the ".ps" in the last line to ".pdf" so you get:

man -t $1 | pstopdf -i -o /tmp/$1.pdf
open /tmp/$1.pdf
sleep 60 && rm -f /tmp/$1.pdf &


[ Reply to This | # ]