ShellStream help

Jun 25, 2015 at 7:14 PM
Edited Jun 25, 2015 at 8:11 PM
I am looking for a VERY simple working example of a shellstream __in c# __that will allow the user to send multiple cascading terminal commands
e.g. ("cd /somewhere") and then ("pwd")
when i read the response want to get back "cd /somewhere"

Most examples i have followed seem to think they are doing this but when i read the stream i am just getting back the text i am writing in the the stream verbatim. This is not what i am looking for.

Can anyone please help?
Jun 26, 2015 at 5:35 PM
Ok i found a post on the forums that got me started, and i was able to finally put the rest together.

The trick was using StreamReader and StreamWriter objects to read and write to my stream variable that i was saving as a global and not simply try to write strings to the stream.

Silly i know but hey.
Marked as answer by autopete on 6/26/2015 at 10:35 AM