Reputation: 1683
I am sorry that I didn't write a related title, but I couldn't think of one. So my question is: do you know, in linux. When, for example you type telnet then press enter then o ip.add.re.sss how can u do this in one line? yeah I know for telnet I can just type telnet ip.add.re.sss and press enter and it will connect, I couldn't think of a better example, but some commands dont work this way, I have to press enter and enter the "command" then put my other commands is there a way to simulate the pressing of the "enter" button ? to be something like : telnet (magic character or something) o ip.add.re.sss
Upvotes: 0
Views: 184
Reputation: 65274
Look at the concept of pipelines - the use the output of one command as the input to the next, so
echo "o ip.add.re.sss" | telnet
will do the trick. Mind though, that pipelining is permanent, you need to input all or nothing via it.
Upvotes: 2