[opensuse] Tell zypper not to display progress
All -- This seems like something that should be obvious, but it's got me stumped: is it possible to tell zypper to run and display results, but _not_ to display its progress along the way? I have 50+ machines for which I need to collect update status on a day to day basis, for distribution (via email) to admins. This wouldn't be a big deal, except for the silly status summary. The normal output of zypper looks like this: ------------- ~> sudo zypper lu * Reading repository 'oss' cache * Reading repository 'non-oss' cache * Reading repository 'updates' cache * Reading installed packages [100%] Repository: | Name | Version | Category | Status -------------+--------------------+---------+----------+------- updates | libiniparser-32bit | 4488-0 | optional | Needed updates | openmotif22-libs | 4540-0 | optional | Needed --------------- But, when the output is piped to a file, it ends up creating a seperate line for each update to the progress "spinner", or percentage. Which is ugly, and a little unreadable. I've tried "zypper -q", and that still outputs the progress meters... Anyone? Thanks, Ian -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Dienstag, 5. Februar 2008 Marlier, Ian:
But, when the output is piped to a file, it ends up creating a seperate line for each update to the progress "spinner", or percentage. Which is ugly, and a little unreadable.
zypper lu | col > output seems to do it. Cheers, Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2/5/08 1:38 PM, "Wolfgang Woehl" <tito@rumford.de> wrote:
Dienstag, 5. Februar 2008 Marlier, Ian:
But, when the output is piped to a file, it ends up creating a seperate line for each update to the progress "spinner", or percentage. Which is ugly, and a little unreadable.
zypper lu | col > output seems to do it.
Cheers, Wolfgang
Hrm...actually, that's not working for me. If I do `zypper lu > /tmp/z1 && cat /tmp/z1 | mail -s ...`, the output comes through as a binary attachment. If I do `zypper lu | col > /tmp/z2 && cat /tmp/z2 | mail ....`, it doesn't come through as a binary attachment, but it's not pretty output either (see below). In the end, what worked for me was using grep to remove the relevant lines. I guess the way that the progress meter is coded, it basically writes out the line over and over, with a reset of the cursor position with each update -- took me a while to figure that out, though. The command that I ended up with is `zypper lu | grep -v "Reading" | grep -v "^$" > output && cat output | mail ....` Output of `zypper lu | col > output && cat output | mail...`: 2\|/-\|*KRRRRRRReeeeeeeaaaaaaadddddddiiii iiinnnnnnnggggggg rrrrrrreeeeeeepppppppooooooosssssssiiiiii itttttttooooooorrrrrrryyyyyyy '''''''ooooooossssssssssssss''''''' cccccccaaaaaaaccccccchhhhhhheeeeeee222222 KKKKKK 2/-\*KRRRReeeeaaaaddddiiiinnnngggg rrrreeeeppppoooossssiiiittttoooorrrryyyy ''''nnnnoooonnnn----oooossssssss'''' ccccaaaacccchhhheeee222KKK 2|/-\*KRRRRReeeeeaaaaadddddiiiiinnnnnggggg rrrrreeeeepppppooooosssssiiiiitttttooooorr rrryyyyy '''''uuuuupppppdddddaaaaattttteeeeesssss'' ''' cccccaaaaaccccchhhhheeeee2222KKKK R\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\ |/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/ -\|/-\|/-\|/-\|/-\|/-\|/-*eaRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR RRRRRRRRRRRRRRdeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eiaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaanddddddddddd dddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddd ddddddddddddddgiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnRggggggggggg gggggggggggggggggggggggggggggggggggggg gggggggggggggggggggggggggggggggggggggg ggggggggggggggPMiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnndsssssssssss ssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssss ssssssssssssssatttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttt ttaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaalllllllllll llllllllllllllllllllllllllllllllllllll llllllllllllllllllllllllllllllllllllll llllllllllllllblllllllllllllllllllllll llllllllllllllllllllllllllllllllllllll llllllllllllllllllllllllllllllllllllll llaeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeesdddddddddd dddddddddddddddddddddddddddddddddddddd dddddddddddddddddddddddddddddddddddddd ddddddddddddddde.pppppppppppppppppppppp pppppppppppppppppppppppppppppppppppppp pppppppppppppppppppppppppppppppppppppp ppp.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaa.ccccccccc cccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccc cccccccccccccccc2kkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk kkkKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaagggggggggg gggggggggggggggggggggggggggggggggggggg gggggggggggggggggggggggggggggggggggggg gggggggggggggggeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eesssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssssssssssssssss ssssssssssssssssssssssssss [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[[[[[[[[[[[[[[[[[[[01234567891111 11111122222222223333333333444444444455 55555555666666666677777777778888888888 99999999991%%%%%%%%%%01234567890123456 78901234567890123456789012345678901234 567890123456789012345678901234567890]]] ]]]]]]]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%02222222222]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]%KKKKKKKKKK22222222222222222222 22222222222222222222222222222222222222 22222222222222222222222222222222]KKKKK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK KKKKKKKKK Repository: | Name | Version | Category | Status -------------+--------------------+---------+-------------+------- updates | hal | 4963-0 | recommended | Needed updates | java-1_5_0-sun | 4940-0 | security | Needed updates | libiniparser-32bit | 4488-0 | optional | Needed updates | openmotif22-libs | 4540-0 | optional | Needed -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Mittwoch, 6. Februar 2008 Ian Marlier:
If I do `zypper lu | col > /tmp/z2 && cat /tmp/z2 | mail ....`, it doesn't come through as a binary attachment, but it's not pretty output either (see below).
Works good here in konsole and bash. Maybe your term settings differ?
In the end, what worked for me was using grep to remove the relevant lines. I guess the way that the progress meter is coded, it basically writes out the line over and over, with a reset of the cursor position with each update -- took me a while to figure that out, though.
Yes, and col removes those reverse line feeds. Here it does :) I'm sure there are real bash geeks around that would know what's not working for you with it.
The command that I ended up with is `zypper lu | grep -v "Reading" | grep -v "^$" > output && cat output | mail ....`
Fine. Wolfgang -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Ian Marlier
-
Marlier, Ian
-
Wolfgang Woehl