How do I issue multiple commands using telnet or netcat?

0

1

At the moment I am struggling very very very much to issue commands on telnet. I can issue them one at a time but after that I don't know how to issue the next one because the command line prompt disappears.

covertbob

Posted 2012-04-09T21:08:24.683

Reputation:

Answers

0

I assume you start a program from the shell and that runs in foreground. The program takes control of input and output and you cannot enter another command in the shell ("command line prompt disappears") as long as the process runs. Depending on what you are trying to do, the solution could be to send the processes to the background by adding "&" as a parameter:

Example:

sleep 10

This starts the sleep program and the process runs for 10 seconds in foreground before it terminates and I can issue another command (the commandline reappears).

sleep 10 &

In this case the process runs for 10 seconds in background before it ends and the commandline does not disappear.

user16115

Posted 2012-04-09T21:08:24.683

Reputation: