Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 28th May 2007, 10:38 PM
AlFrugal Offline
Registered User
 
Join Date: Oct 2006
Posts: 168
Question about piping yum to tee

I run FC5 and am a *novice* Linux user. When running yum, I like to keep a record of what happened as well as watch the progress on the screen, so I pipe yum to tee. For example: "yum groupinstall xxx | tee xxxinstall"

This works as I expected except for one thing.

At the tail end of the yum processing, something like the following should be displayed:

Transaction Summary
================================================== ===========================
Install 18 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 125 M
Is this ok [y/N]:


This indeed gets written to the file (e.g. xxxinstall). But the line "Is this ok [y/N]:" does not get displayed on the screen. However, if I enter "y" or "N" on the keyboard anyway, yum proceeds to completion.

Why isn't the line "Is this ok [y/N]:" being displayed?
Reply With Quote
  #2  
Old 29th May 2007, 12:51 AM
dishawjp Offline
Registered User
 
Join Date: Mar 2004
Location: Central NY
Age: 61
Posts: 471
I can't answer your question, however I can make a suggestion, use the "script" command instead. It should record all inputs and outputs...everything you see on your screen.

Begin by giving the command :

script nnn

Then just run yum or whatever. When you want to stop recording, type <ctrl>D and everything should be recorded in the file "nnn." Obviously you can change the filename to be whatever you choose.

HTH,

Jim
__________________
Registered Linux User 294493
Reply With Quote
  #3  
Old 29th May 2007, 10:31 PM
AlFrugal Offline
Registered User
 
Join Date: Oct 2006
Posts: 168
Thanks dishawjp for the alternate approach.
Reply With Quote
  #4  
Old 30th May 2007, 07:59 PM
AlFrugal Offline
Registered User
 
Join Date: Oct 2006
Posts: 168
I received an automatic email from Fedoraforum that user "brunson" has replied to this thread. The email listed the reply. But I don't see the reply on the thread.....

Anyway, brunson's suggestion was:

***************
It's probably writing it to stderr rather than stdout.

yum groupinstall xxx 2>&1 | tee xxxinstall
***************

So I tried that today with two different yum updates. (I didn't have anything to install today). In both cases, the screen froze partway through yum's listing of "Dependencies Resolved". This is the step just before the transaction summary. In both cases, if I entered "N", then the listing of resolved dependencies on the screen resumed, and yum exited. So it appears that writing to stderr is not the problem I'm having.

I expect with the release of F7 scheduled for tomorrow, the FC5 mirrors will be locked, so I won't be able to do more experiments for 7-10 days.
Reply With Quote
  #5  
Old 30th May 2007, 08:17 PM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,752
He probably double checked and deleted his reply when he realized that wasn't the case.

Now I'm wondering, if you are just updating or installing something, wouldn't this work just as well, sorry I toasted my FC install and since F7 is almost out I can't really try it.

yum -y install xxx > yum-053007.txt

BTW - a record is already kept in /var/log/
Reply With Quote
  #6  
Old 30th May 2007, 08:33 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
dishawjp's solution is great, just that you may need to remove escape sequences and control characters from the resulting log

Code:
cat xxxinstall | col -b > tidy_xxxinstall
This is assuming you did the following

Code:
script xxxinstall
yum groupinstall xxx
(answer y to the question)
(press CTRL-D on completion)
Reply With Quote
Reply

Tags
piping, question, tee, yum

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trivia(l) Question: piping 'more' & 'less' lose pretty colors Hlingler Using Fedora 2 27th June 2008 04:47 AM
piping question elgaza Using Fedora 9 26th November 2007 10:09 PM
Piping to a printer chris_y2k_r1 Using Fedora 4 18th March 2006 11:38 PM
piping to X display teethlikelions Using Fedora 13 2nd March 2006 08:12 PM


Current GMT-time: 08:40 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat