test test |
My Fighting With Unix, Part I First I tried to write code that went like:
This took me a while, as I've never done anything that complex with shell scripts. (I've done a line ending shell script, and that's about it). Well, that method worked, to the extent that the files were gone. That is, the files that were on my OS X partition before I put them in my trash. Files that were on my other partitions were NOT deleted. So, I decided to use the osascript tool. Got that working painlessly, and lo, trash was deleted. Then I proceeded to try to get it running automatically, and I talked about that yesterday. To Be Continued In "My Fighting With UNix, Part II" |
|
http://diveintomark.org/archives/2002/07/16.html#search_amazon_from_python [Dave's Handsome Radio Blog!] WebServices at Amazon. At MacHack, Tim O'Reilly said they (the both of them) were working on something like this. It's neat to have something come out of that collaboration |
Grr... because of my super-full schedule, I can't watch the MacWorld Keynote. I'll have to read about it.. :-( |
My Fighting With Unix, Part II I just spent 3 hours getting a simple shell daemon to run. (It empties my trash every 5 minutes). First tried cron. Fought with that for an hour, and couldn't get it to work. Stupid cron (or stupid me not able to figure Cron out) Second tried Applescript. "Do Shell Script" didn't give me any love (and I don't know why) Tried an AppleScript Studio app, calling "Do Shell Script". Guess what, it didn't work. Tried a Cocoa app, with NSPipe/NSTask. Even though I've done things like that before, I couldn't figure it out at 2 in the morning. So, in my frustration, I created a .command file (read: a unix command in a text file), set it to executeable, and set it as a login item. total time spent on utility that empties my trash every 5 minutes: probably anywhere from 4-5 hours. total usefulness: minimal, at best ability to say "take THAT" to Unix: priceless Somethings' l33tness just can't do. For everything else, there's shellscript-just-barely-working h4x0ring |