Nope. Several problems in using dos2unix. In the first place, it's not ^M we want to get rid of, it's the overtyped lines which they conceal. Simply taking out ^M, which you can do with an editor, means those overtyped lines would be strung out in a long string whereas what we want to look at is only the last segment. In the second place, all dos2unix does is convert ^M^J to ^J. It does not simply remove ^M, as is evidenced by the test I just ran. In short, what we need is to have those lines executed (ie the ^M's honored) while keeping track of actually folded lines. It may be a bit more complex than that but I have to get to other work right now. That's the basic concept at any rate. On Wed, Aug 10, 2005 at 05:57:06PM +0200, Marian Selea wrote: > Try dos2unix tool... It gets rid of those ^M stuff and makes things fine... > > Hih, M. > > > > > Does anybody have a good means for reviewing output from long > > (multi-screen) YUM sessions? Less -r almost works. > > > > The problem: > > > > Yum writes lines that look normal but are actually composed of strings > > which keep rewriting the same line as the data changes. These strings > > are separated by ^M which causes the cursor to go back to the > > beginning of the screen line to rewrite the entire line with updated > > data. This is how it gets those counters to increment and the row of = > > or # to keep getting longer. > > > > For example, using fictitious data off the top of my head: > > > > Extras 1% 1/1586^MExtras 1% 2/1586^M...^MExtras 100% 1586/1586 > > > > Add to that the counter during download of each new package to be > > installed and you have a combination of very long lines and lots of > > them. I have output from a few days ago whose maximum line length is > > 3547 and whose line count is 442. > > > > What I want to do is review this output from the top without having to > > read each of these ^M-separated strings. > > > > Fedora includes a utility called script(1) which captures the lines as > > they're sent to the screen. In fact, it's from a script log that the > > example above is patterned. So, I can get the output into a file. But > > how to display it? > > > > less -r almost works. -r causes the ^M's to be executed, so each such > > line displays its final incarnation (the 100% 1586/1586 counter in the > > example). > > > > The only problem here is that there's also one or more lines which > > must be folded. The -r switch in less causes it to not attempt keeping > > track of folded lines. This can cause paging to scroll some unviewed > > lines off the top of the screen. I recently went from item 35 at the > > bottom of one page to 46 at the top of the next. I can move forward > > and back a line at a time with the arrow keys but it's a pain and may > > not always suffice. > > > > I have a very thorough text display script set (lb) that I use all the > > time. I thought I would use grep to locate the last ^M or 3 in each > > line; but the lines are sometimes too long for grep. > > > > There are all kinds of things that might help, like fold or col for > > example, but I was wondering if anyone has actually used these for > > this purpose. There's a utility called scriptreplay that I haven't > > located yet. And of course a C programmer could probably knock > > something together in no time (hint hint :-). > > > > Thanks in advance for any info, especially personal experience, > > > > -- > > > > Lee Maschmeyer > > <lee_Maschmeyer@xxxxxxxxx> > > > > "The rain has turned to tears, > > And I've been achingly, agonizingly empty these many years... > > And I've only had two beers." > > --Bob and Ray > > > > _______________________________________________ > > > > Blinux-list@xxxxxxxxxx > > https://www.redhat.com/mailman/listinfo/blinux-list > > > > _______________________________________________ > > Blinux-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/blinux-list -- -- Lee Maschmeyer <lee_Maschmeyer@xxxxxxxxx> "The rain has turned to tears, And I've been achingly, agonizingly empty these many years... And I've only had two beers." --Bob and Ray _______________________________________________ Blinux-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/blinux-list