[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Capturing output from ftp



Hello all,

So I followed directions from a previous message, but I've run into a
different problem.

I need to get the size of a given file with the ftp program, so I tried
something like this:

ftp server <<END
size filename
quit
END

The problem is, when it returns the information, it doesn't seem to be
getting sent to standard out, or whatever you call it. If I do nlist or
ls instead of size, even modtime, I can set that output to a variable.
But in the case of size, it seems to return as a server message (with a
special number before it, like the lines you get when you first log on,
while tranferring a file, etc), and I need to somehow capture this
information into a variable. How do I do this?

Thanks



Reply to: