LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash script (https://www.linuxquestions.org/questions/linux-newbie-8/bash-script-4175519379/)

ei9dl 09-19-2014 04:38 AM

bash script
 
Hi all
I am new to this forum so please excuse me if I make silly mistakes.
I want to make bash script for me to send data displayed on computer A to computer B via telnet. I have tried the following but this fails.
> {
> echo "crack"
> sed -n 's/XOR: *\(.*\)/\1/p'
> } | telnet $1 6666
I run the script with ./"this file name" and the IP of the destination computer B
Can someone tell me where I am going wrong.
Tom

pan64 09-19-2014 07:01 AM

see man page of telnet: The telnet command is used for interactive communication
telnet is not able to handle pipes that way.
you can try scp for example instead


All times are GMT -5. The time now is 05:38 PM.