Viewing long YUM output

Thomas Stivers stivers_t at tomass.dyndns.org
Thu Aug 11 13:39:43 UTC 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On Thu, Aug 11, 2005 at 08:57:07 AM -0400, Lee_Maschmeyer at wayne.edu wrote:
> 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.

I think you could do this with vim as follows. This is untested.

:%s/^v^m[^^v^m]\(.+\)$/$1/

Where I have written ^v^m you should actually press ctrl+v ctrl+m. The
ctrl+v quotes the ctrl+m and lets you type it directly.

This expression says match a ^m followed by 1 or more non ^m characters
to the end of the line, then replace the whole line with only those non
^m characters in the parentheises. The % says to do this with every line
in the file.

I am no regular expression expert, so this may reak untold havoc and I
disclaim all responsibility for results of my inneptitude.

- -- 
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

Thomas Stivers	e-mail: stivers_t at tomass.dyndns.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC+1Ue5JK61UXLur0RA6edAJ4yNe2rXht1MI66MD/riiu/aVuSbQCePh8C
SLJSOM7Vr8vlEdo8Q7LOCDo=
=P1/g
-----END PGP SIGNATURE-----




More information about the Blinux-list mailing list