writing to linux terminal
Posted: Thu Apr 17, 2014 10:33 am
How do I write to a terminal using under linux? (if possible multiplatform then better too)
For example in Ubuntu you can open two terminal, type 'tty' to get the handle. and you can pipe between them. for example you can type in one but the output get out on the other one.
So the question is...
1. how do I open a new terminal window in PureBasic and already have the handle?
2. or if I already have a terminal window open, provide this to PureBasic?
3. how to I write to terminal? including newline?
for example this:
-a person open a terminal window
-run my app
-provide the tty handle to my app
-my app ask for name
-print out "Hello name" in the terminal window.
-and provide a new line / enter
-so that I can also send 'echo 'name' to the terminal and press enter.
even a simple example can be helpful. you know, something as simple as:
-ask for terminal tty handle
-print hello world in the terminal
Thanks.
For example in Ubuntu you can open two terminal, type 'tty' to get the handle. and you can pipe between them. for example you can type in one but the output get out on the other one.
So the question is...
1. how do I open a new terminal window in PureBasic and already have the handle?
2. or if I already have a terminal window open, provide this to PureBasic?
3. how to I write to terminal? including newline?
for example this:
-a person open a terminal window
-run my app
-provide the tty handle to my app
-my app ask for name
-print out "Hello name" in the terminal window.
-and provide a new line / enter
-so that I can also send 'echo 'name' to the terminal and press enter.
even a simple example can be helpful. you know, something as simple as:
-ask for terminal tty handle
-print hello world in the terminal
Thanks.