On Feb 16, 2013, at 3:07 PM, Rod Schmidt <
rod.s...@gmail.com> wrote:
> How do I capture the output of the system function? Or do I have to do it the Obj-C way and create a pipe and capture it that way?
If you use "system", then you'll have to do it manually. However, there's an extension on NSString that provides a "stringWithShellCommand:" class method, that might do what you want:
$ nush
Nu Shell.
% (NSString stringWithShellCommand:"ls ~")
"Applications\nBackups\nDesktop\nDocuments\nDownloads\nDropbox\nLibrary\nMovies\nMusic\nPictures\nPublic\nSites\nSource\nWork"