View previous topic :: View next topic |
Author |
Message |
disi Veteran
Joined: 28 Nov 2003 Posts: 1354 Location: Out There ...
|
Posted: Wed Jul 11, 2012 6:21 pm Post subject: [solved] messages are not displayed properly |
|
|
I use syslog-ng as a system logger in the default runlevel and get something like this with /usr/bin/less as PAGER:
Code: | 0009f960 64 5f 69 6e 74 72 65 73 5b 38 31 30 35 5d 3a 20 |d_intres[8105]: |
0009f970 44 4e 53 20 33 2e 67 65 6e 74 6f 6f 2e 70 6f 6f |DNS 3.gentoo.poo|
0009f980 6c 2e 6e 74 70 2e 6f 72 67 20 2d 3e 20 38 33 2e |l.ntp.org -> 83.|
0009f990 32 32 39 2e 31 33 37 2e 35 32 0a 4a 75 6c 20 31 |229.137.52.Jul 1|
0009f9a0 31 20 31 39 3a 31 30 3a 30 31 20 64 69 73 69 2d |1 19:10:01 disi-|
0009f9b0 62 69 67 74 6f 70 20 63 72 6f 6e 5b 38 37 37 31 |bigtop cron[8771|
0009f9c0 5d 3a 20 28 72 6f 6f 74 29 20 43 4d 44 20 28 74 |]: (root) CMD (t|
0009f9d0 65 73 74 20 2d 78 20 2f 75 73 72 2f 73 62 69 6e |est -x /usr/sbin|
0009f9e0 2f 72 75 6e 2d 63 72 6f 6e 73 20 26 26 20 2f 75 |/run-crons && /u|
0009f9f0 73 72 2f 73 62 69 6e 2f 72 75 6e 2d 63 72 6f 6e |sr/sbin/run-cron| |
//edit: more or cat are OK
//edit: I suck at forum search:
https://forums.gentoo.org/viewtopic-t-443771.html
//edit: fix/workaround:
Code: | disi-bigtop ~ # echo $LESSOPEN
|lesspipe %s
disi-bigtop ~ # export LESSOPEN="%s"
disi-bigtop ~ # echo $LESSOPEN
%s |
_________________ Gentoo on Uptime Project - Larry is a cow |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Thu Jul 12, 2012 7:47 am Post subject: |
|
|
disi ... Wolfgang Friebel's lesspipe.sh works fine for such things.
Code: | % awk '/path.*HOME/' ~/.zprofile
path=(${HOME}/bin $path)
% awk '/lesspipe/' ~/.zprofile
if (( $+commands[lesspipe.sh] )) ; then
export LESSOPEN="|${commands[lesspipe.sh]} %s 2>&-"
% echo $LESSPIPE
|/home/khayyam/bin/lesspipe.sh %s 2>&-
% echo $LESS
-i -s -M -g -x4 -R -P%t?f%f :stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-... |
HTH & best ...
khay |
|
Back to top |
|
|
|