LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-19-2014, 04:38 AM   #1
ei9dl
LQ Newbie
 
Registered: Sep 2014
Posts: 1

Rep: Reputation: Disabled
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
 
Old 09-19-2014, 07:01 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash Script - Reading User Input while Processing output from Command within Bash cleeky Linux - General 5 05-27-2014 02:57 PM
How to end the bash script using commands in bash not manually by pressing ctrl+c Sanpreet Singh Linux - Newbie 1 07-03-2013 01:04 PM
[SOLVED] Converting Script from Linux (GNU) Bash 4 to Solaris Bash 2.05 - Any cheat sheet? oly_r Solaris / OpenSolaris 6 05-03-2013 08:25 AM
SSH connection from BASH script stops further BASH script commands tardis1 Linux - Newbie 3 12-06-2010 08:56 AM
[SOLVED] Using a long Bash command including single quotes and pipes in a Bash script antcore Linux - General 9 07-22-2009 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration