Quote:
Originally Posted by knc1
Format character: %I hour (01..12)
Hint:
man date
In either a full Linux install or in a web search engine.
|
I read the man page ans in now the formatting commands and use Linux Ubuntu since 10 years as my main system and on servers..
There is a command that give the time in local (24 or 12AM/PM) format. But only with seconds.
The command that I reused to grep the right statements and display the data is highly complex from my point of view. I was not able until now to find a solution how to strip the seconds or use different formats in depends of the local settings
Code:
# This next part says, "Clear Log" then
# "Push the new log, line by line, into awk" then
# "If a certain line is matched by awk get awk to run eips via the shell"
&> /var/log/messages && 2>/dev/null tail -F /var/log/messages | exec parselog | \
awk '/.*PageTurnAction*./ || /.*JunoExecutionManager*./ {system("eips ${POS} ${ROW} `date +%H:%M`-`gasgauge-info -s`")}'
exit 0
HaPe