01-18-07 12:28 AM
Lie-Algebra wrote:
> Hi,
>
> I have written a script which deals with ftp transfers, both upload and
> download.
>
> Here is the main part :
>
> ftp -nv ${HOST} <<EOF > $FTPTMP 2>&1
> user ${LOGIN} ${PASSWORD}
> prompt
> lcd ${LOCAL_DIR}
> cd ${REMOTE_DIR}
> binary
> hash
> $COMMAND
> bye
> EOF
>
> Where FTPTMP is a file from which I can diagnose the ftp session...
>
> In the interactive mode, the ftp command hash displays on the screen the
> symbol "#", one per 1024 bytes transfered.
>
> When using the script and the commands above, no "#" appears in the file
> used for redirection.
>
> Is hash mark printing use a specific output ?
>
> My initial goal was to redirect exclusively the hash mark printing on
> the screen without the rest because my script controls the whole display.
>
>
> Thanks
Presumably your standard output, which is line buffered when written to
a terminal, is block buffered when redirected to a file. So all your
hases will appear in the file at the end of your transfer.
Robert
[ Post a follow-up to this message ]
|