Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Running Script from Telnet - Problems Post 302091537 by jim mcnamara on Tuesday 3rd of October 2006 01:58:07 PM
Old 10-03-2006
When you're inside a program, like ftp, scripts are not what you need. You can try
one of these ways to make it work:
one way:
Code:
echo "
verbose
open <remote_node>
user <username password>
lcd </path>
cd </remotepath>
pwd
get somefile
bye 
" | ftp

or with a here document
Code:
ftp remote_node <<EOF
user <username password>
lcd </path>
cd </remotepath>
pwd
get somefile
bye 
EOF

<<EOF marks the start, EOF marks the end of the here document.

If you are using ksh consider coprocesses - search the FAQ here for ftp.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problems with Telnet

Hi everybody I already have installed Linux Red Hat FC4 in two machines into the same net using DHCP in both of them, the network interface are working fine cuz i can surf in Internet in those machines The problem is i need to do a Telnet from one host to the other, the xinetd and telnet... (1 Reply)
Discussion started by: Lestat
1 Replies

2. UNIX for Dummies Questions & Answers

Problems with telnet.

Hi Guys! I'm trying to connect to a regatta IBM (Sun 5.8) from my recently installed Sun Blazer, but I got the following: % telnet regatta Trying 167.164.87.8 Connected to regatta Escape character is '^]' Connection closed by foreign host % Do you have any idea what the problem is?... (2 Replies)
Discussion started by: cordobapablo
2 Replies

3. UNIX for Dummies Questions & Answers

problems running a sql loader script

Hi Folks, I have created a number of unix scripts that i can run from the scheduler on a server-side application that we use (Chordiant Marketing Director). All scripts are working except one. This last script is a user load script which first truncates a table and then loads it using a flat... (2 Replies)
Discussion started by: jibbadiah
2 Replies

4. Solaris

running script after closing telnet

Hi Guys, I have a question, is there a way or an option where i can run a script continuesly after i close the telnet window?? because im running a cobol program which runs several hours and im thinking that ill run it after office hours so the run will be finish the next day.. the thing is i need... (2 Replies)
Discussion started by: shinjeck
2 Replies

5. Shell Programming and Scripting

Problems in running a Perl script via cronjob

I have a very basic perl script that attempts to find if a process is running. If the process is not running then the script is supposed to start the process. If I execute the script from command line it works fine as expected. However if the script is executed via cronjob, the script cannot find... (1 Reply)
Discussion started by: ypant
1 Replies

6. AIX

Problems with SSH / telnet

Hey, I have upgraded 3 servers from SSH Tectia 4.0.3 to SSH Tectia 6.0.2. 2 of them are working fine but one server suddenly began to have troubles after about 2 hours. Now it is impossible to login to this server using SSH and even telnet. When SSH is running on this particular server, the CPU... (20 Replies)
Discussion started by: Hille
20 Replies

7. UNIX for Dummies Questions & Answers

Problems running script on remote Terminal

Hi, I'm new here so please excuse any stupidity that occurs in my post :P My situation: Have a java program which I have to run a ridiculous amount of times and put the output data into a text file. Thought the easiest way to do this would be to delve into the world of scripts. I am at home... (1 Reply)
Discussion started by: lozyness
1 Replies

8. Red Hat

Problems with script running with crontab

Hi, I'm trying the backup a few information commands of my Check Point FW (it's on a SPLAT linux machine). This is the script I wrote: #!/bin/bash cd /var/tmp/ file1=netstat_`/bin/date +%d%m%y`.txt file2=ifconfig_`/bin/date +%d%m%y`.txt file3=cpstatos_`/bin/date +%d%m%y`.txt... (2 Replies)
Discussion started by: nirsh
2 Replies

9. Shell Programming and Scripting

Problems running script in cron...

Hi all, I have a script running on a Solaris 8 box and the first thing it does it check which user is executing it; if ; then echo "This script must be run as testuser" 1>&2 exit 1 fi This works fine when manually running the script however when adding into that users' crontab it... (1 Reply)
Discussion started by: JayC89
1 Replies

10. Shell Programming and Scripting

Error while running xterm in telnet script

Error: Type xterm -help for a full description. xterm: Explicit shell already was /root/Desktop/telnet.sh xterm: bad command line option "Done!" usage: xterm (0 Replies)
Discussion started by: sk151993
0 Replies
ftp::geturl(n)							    ftp client							    ftp::geturl(n)

__________________________________________________________________________________________________________________________________________________

NAME
ftp::geturl - Uri handler for ftp urls SYNOPSIS
package require Tcl 8.2 package require ftp::geturl ?0.2.1? ::ftp::geturl url _________________________________________________________________ DESCRIPTION
This package provides a command which wraps around the client side of the ftp protocol provided by package ftp to allow the retrieval of urls using the ftp schema. API
::ftp::geturl url This command can be used by the generic command ::uri::geturl (See package uri) to retrieve the contents of ftp urls. Internally it uses the commands of the package ftp to fulfill the request. The contents of a ftp url are defined as follows: file The contents of the specified file itself. directory A listing of the contents of the directory in key value notation where the file name is the key and its attributes the asso- ciated value. link The attributes of the link, including the path it refers to. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category ftp of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. SEE ALSO
ftpd, mime, pop3, smtp KEYWORDS
ftp, internet, net, rfc 959 CATEGORY
Networking ftp 0.2.1 ftp::geturl(n)
All times are GMT -4. The time now is 01:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy