X-Spam-Check-By: sourceware.org Message-ID: X-Sender: rbody99 AT hotmail DOT com In-Reply-To: From: "Robert Body" To: cygwin AT cygwin DOT com Subject: RE: sftp progress showing ... 66% complete Date: Sat, 10 Dec 2005 00:31:07 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 AT where DOT 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 AT robertbody DOT 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/