|
|
Fast trash emptying via Unix script turned into an app
Platypus is fine if that's what you want to do, but there's no need for it in this case; this script can be run straight from OS X using applescript. just add the above script into a text string and use applescript's do shell script command to launch it, as follows:
paste this is Script Editor, and either save it as an application to run on its own, or run it as a script from QuickSilver, Butler, apple's Script Menu, or whatever other script launcher you might use.
Fast trash emptying via Unix script turned into an app
There's an error in the script: du returns block count (with blocks of 512 bytes), not bytes.
Use the parameter -k if you want Kb, or, better, use the -h parameter for "human readable" value (with Kb/Mb/Gb scaling). Moreover, using the -s parameter you can omit the 'tail -1' command; so: byts=`du | tail -1` becomes byts=`du -sh`
Fast trash emptying via Unix script turned into an app
mmmhmm... my comment was for the main article, not an answer to the above reply.
Fast trash emptying via Unix script turned into an app
That is really a waste of what Applescript is meant for. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|