Subject: pblm: Piping in FTP commands to FTP
To: , <netbsd-help@netbsd.org>
From: Matt McRae <Matt.McRae@netcontech.com>
List: netbsd-help
Date: 08/25/1999 15:33:54
This is a multi-part message in MIME format.

------=_NextPart_000_001F_01BEEF0F.3D3B58C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit


Having a problem with FTP on NetBSD 1.4.

I have been using ftp in shell scripts and piping into ftp the contents of a
file that contain ftp commands:

	ftp -v -i -n ftp://username:pass@ftp.server.com < upload.ftp
(contents of upload.ftp)
	lcd /tmp
	bin
	put file.tar
	close
	bye

(Session dialog listed below)
	Connected to www.server.com.
	220 server.com FTP server (Version 6.00) ready.
	Remote system type is UNIX.
	Using binary mode to transfer files.
	331 Password required for username.
	230- NetBSD 1.2.1 (www_server_com) #0: Fri Dec 19 20:12:04 GMT 1997
	230-
	230- Welcome to NetBSD!
	230-
	230 User username logged in.
	200 Type set to I.
	usage: lcd local-directory
	221 Goodbye.

In the previous version of NetBSD the username and password along with
server name were in the
contents of the file that is piped into ftp.  This format resonded back with
a usage error:

	# ftp -i -n < upload.ftp
(contents of upload.ftp)
	open ftp.server.com
	user anonymous joe.blo@server.com
	lcd /tmp
	put file.tar
	close
	bye
response from NetBSD
	# ftp -i -n < upload.ftp
	usage: open host-name [port]

Can anyone tell me what I am doing wrong/is the above still compatible?  I
am at a roadblock

Thanks in advance
Matt McRae


------=_NextPart_000_001F_01BEEF0F.3D3B58C0
Content-Type: application/ms-tnef;
	name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="winmail.dat"

eJ8+IjYTAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEGgAMADgAAAM8HCAAZAA8AIQAAAAMAKgEB
A5AGAGQIAAAnAAAACwACAAEAAAALACMAAAAAAAMAJgAAAAAACwApAAAAAAADAD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