I’m trying to make a tiny OS X app that would start a bash script on-demand and print its output in a text field, but not its result after its completion, its result while it runs.
It’ll be just a simple app with one start/stop button.
Any ideas of how I could do this?
Thanks a lot!
Take a look at the answers on SO here or just read documentation for classes NSTask and NSPipe
Just edited my answer to make it a little more clear:
the idea is to add a notification (NSFileHandleDataAvailableNotification) on the NSFileHandle returned by the NSPipe method fileHandleForReading.
Hope this helps =)