How can I (or what is the suggested method for) have my application connect
to a remote unix server, in order to execute commands(e.g., grep, find, etc),
and then receive the resulting output for parsing?

(I need my application to be able to search through text files and return
information found therein, but, I can find no tutorial or examples of applications
that perform such tasks).