How do I issue multiple commands using telnet or netcat?

How do I issue multiple commands using telnet or netcat?

  • 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.

  • Answer:

    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.

covertbob at Super User Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.