This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sftp progress showing ... 66% complete


ok it appears my problem is with my script, not sftp:

specifically with using tee or > in the command: (time $mycommand) 2>&1 | tee $tempFile

I am trying to time $mycommand which is "sftp who@where.com < fileWithActions"
I need the output of _time_ and then i head and tail it and send to perl for formatting, then it's bannered and logged


however using > or tee prevents sftp from outputting progress only though, it tells me everything else like changing directory, enabling progress

How can I use > or tee and write output of _time_ to a file, yet still be able to see the progress inside of sftp ?

-Robert
-----------------------------------------
mycommand="$myftp robertbody@robertbody.com /home/Owner/bin/ftp/tgz"
(time $mycommand) 2>&1 | tee $tempFile

sleep 3   # delay ftp, due to ftpd running on velcom, to rename file
change-title "cygwin";

#---------------Problem with FTP-----------------------
if [ -a $ftpProblemFile ]; then
 rm $ftpProblemFile
 touch $gtfProblemFile  # report up to "g"
 echo "$H ftp problem discovered ...exiting";
 exit;
fi;
#------------------------------------------------------

cat $tempFile | tail -3 | head -1 | awk {'print $2'} > $tempFile2
$perl_time `cat $tempFile2` | tee $tempFile

$my_banner "`cat $tempFile`";
-----------------------------

my logging lets me store something like this, the second time value is FTP transfer time:
2005-12-09 21:42:01 g-tgz [ 33,521,026] ( 20s, 12m 36s, 11s, 13m 14s) cities things
2005-12-09 22:29:33 g-tgz [ 2,309,383] ( 2s, 58s, 4s, 1m 11s) map bw prog travels my_adventures
2005-12-09 22:31:10 g-tgz [ 25,496,750] ( 5s, 10m 13s, 6s, 10m 33s) slovakia ontario temagami greece
2005-12-09 22:48:50 g-tgz [ 90,072,496] ( 1m 24s, 35m 59s, 36s, 38m 06s) animals answers arizona birds bw california cats cities colorado geo greece me misc




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]