Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-08-2005, 08:37 PM   #1
Registered: Apr 2004
Distribution: Centos, Fedora
Posts: 125

Rep: Reputation: 17
Loss of scp progress indicator when piping command to tee

I have a script which I pipe to a log file. I need the output to appear on the screen as well be captured in a log file so I use the following:

./runscript 2>&1 | tee -a log

I've noticed however the scp command within the runscript no longer outputs its progress indicator (% completion, transfer rate, time remaining) anytime I pipe to tee. So basically if I do this:

scp user@somewhere:/home/user/file1 . 2>&1 | tee -a log

I don't see the progress indicator. It does not appear in the log either. However if I remove the pipe to tee portion, I can see the progress indicator again. How do I pipe to tee but have the progress indicator of scp appear on screen still? Thanks for any help.
Old 03-08-2005, 09:01 PM   #2
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
scp is probably detecting that output no longer goes to stdout, and therefore no longer gets displayed. In a file, the progress indicator would look like trash. The "script" utility might be of use to you here, if it's that important.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
md5sum progress indicator Ianmcc Linux - Software 3 02-04-2009 02:50 PM
Piping and CP command JerryMcFarts Linux - Software 5 10-07-2005 06:21 PM
gui file copy progress indicator? zero79 Linux - Software 3 07-10-2005 02:00 AM
cp command with progress indicator exodist Linux - Software 1 07-21-2004 06:27 PM
bash: How can I create a progress indicator? apeekaboo Programming 5 06-27-2003 10:41 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:12 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration