Is it possible to some shell commands and redirect their results back to Igor?

I am thinking whether I can access the standard terminal under Mac OS X, execute some standard commands and redirect the results back to Igor for further processing, for example, issue "ls *.dat" to get the specific files whose names end with ".dat".

I know there exists IndexedFiles function to do similar things but it is not flexible and slow specially in the directories containing a large number of files, e.g. 50,000.

Any possibility for WaveMatrices to implement more flexible wildcard usage in IndexFiles? Or even just to use "ls" command and reformat the output to the list string format?
See the documentation for ExecuteScriptText and particularly the DemoUnixShellCommand example function.
Thanks a lot!. I originally supposed the script stood for AppleScript and did not pay attentions on it.