Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] messages are not displayed properly
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
disi
Veteran
Veteran


Joined: 28 Nov 2003
Posts: 1354
Location: Out There ...

PostPosted: Wed Jul 11, 2012 6:21 pm    Post subject: [solved] messages are not displayed properly Reply with quote

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
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Jul 12, 2012 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum