View Single Post
Old 02-15-2017, 02:35 PM   #29
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
I think I found the right command:
Code:
date +%X | sed 's@\(..\):\(..\):\(..\)@\1:\2@'
but now I have the problem to include the third part of hyphens in the big awk command. I searched the net an tried a lot of versions but where not able to solve it.

I need to replace
Code:
date +%H:%M
with
Code:
date +%X | sed 's@\(..\):\(..\):\(..\)@\1:\2@'
in this awk statment:
Code:
&> /var/log/messages && 2>/dev/null tail -f /var/log/messages | \
	        awk '/.*PageAction*./ || /.*acxmgrd*./ || /.*NextPage*./ || /.*Reader*./ {system("eips ${POS} ${ROW} \"`date +%H:%M` `gasgauge-info -s`\"")}'
Ideas welcome ...
Hanspeter is offline   Reply With Quote