Re: Percentage complete of unix task
Re: Percentage complete of unix task
- Subject: Re: Percentage complete of unix task
- From: email@hidden
- Date: Fri, 25 Mar 2005 10:46:26 -0800
On Mar 25, 2005, at 2:45 AM, Rakka wrote:
Thanks a lot for the info. I'm sure that Disk Utility runs
diskutil's repairPermissions command and feeds the output to a
textfield, but what are the other steps they go through to figure
out how much of the command is done? I don't see how it works :-)
Over the years, a growing number of unix commands have options to
enable verbose output that is specifically intended to be parsed for
the purposes of updating a user interface. Quite a few of the Apple
specific command line tools have similar options.
Look closely at the man pages and/or usage information for the command
(s) you are invoking as they may have similar features. If the tool
you are invoking happens to be open source, you can always modify it
to spew more information as it works, if necessary.
A long, long time ago, I wrote a joke of a program that updated
prebindings. It was a joke in that prebindings never really needed
to be updated (the joke was on me -- over a quarter of a million
downloads from people, many of who ran the damned thing regularly).
It was intended to demonstrate the invocation of an external tool
while parsing the output to update the user interface. Old code
now, but you might find it useful.
http://cvs.sourceforge.net/viewcvs.py/mosxland/Xoptimize/
XoptimizeAppDelegate.m?view=markup
b.bum
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden