read word on terminal?
i have c code (mycode.c) like this :
#include<stdio.h> int main() { printf("word\n"); return 0; } when i execute them, so the terminal is look like : #./mycode word i want to get "word" in terminal into get_word.c. #include<stdio.h> int main() { char *word_from_terminal; word_from_terminal = ............ /*this variable is refers to word in terminal*/ printf("%s\n",word_from_terminal); return 0; } the output of get_word is : #./get_word word would you tell me what is code in .......... like? thank's |
Hi,
I don't think i've understood the problem fully enough. I guess you want to redirect the output to a differnet terminal...so u have to give the command as - echo `./a.out`>/dev/tty1 |
All times are GMT -5. The time now is 10:42 PM. |