|
Home > Archive > Unix Programming > January 2007 > Hash mark printing during ftp sessions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Hash mark printing during ftp sessions
|
|
| Lie-Algebra 2007-01-17, 1:17 pm |
| 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
| |
| Robert Harris 2007-01-17, 7:28 pm |
| 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
|
|
|
|
|