LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-16-2005, 06:29 PM   #1
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Pipe a file into another?


I don't know how to describe (in the subject) what I'm trying to do ...

In Windows, say you have the following files, with their contents:

1. CONNECT.BAT
telnet 123.123.123.123 < DATA.TXT

2. DATA.TXT
myusername
mypassword
{ --- other commands ---}
exit

When run the CONNECT.BAT script would connect and send the data in DATA.TXT through telnet.

When I attempt this same thing in Linux it doesn't work. I chmod +x my script and use the same basic command (script < datafile).

Can someone tell me how to do it properly?
 
Old 04-16-2005, 09:42 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,549

Rep: Reputation: 180Reputation: 180
"When I attempt this same thing in Linux it doesn't work. I chmod +x my script and use the same basic command (script < datafile)."

Could you post the script that you are running?

--------------------------
Steve Stites
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to pipe output and error to a file while displaying them on monitor? Akhran Linux - Newbie 2 03-29-2006 05:04 AM
ftp file listing: how to pipe to less? Lotharster Linux - Newbie 2 11-29-2005 08:45 PM
pipe xine output to file sohmc Linux - Software 0 01-01-2005 10:03 PM
Pipe telnet session output to text file joshlamerritt Linux - Software 3 02-10-2004 08:42 PM
pipe output to append to a text file davee Linux - Newbie 3 08-27-2003 05:03 AM


All times are GMT -5. The time now is 03:09 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration