The one most usefull to me would be time since command start.
Easy! in seconds: #!/usr/bin/awk -f BEGIN { S=systime() } { print systime()-S": "$0 } zero-padded seconds for nicer output: #!/usr/bin/awk -f BEGIN { S=systime() } { printf("%08i: %s\n",systime()-S,$0) } Now the good one days:hours:minutes:seconds: #!/usr/bin/awk -f BEGIN { S=systime() } { s=systime()-S m=0 h=0 d=0 if (s>=60) { m=s/60 ; s=s%60 } if (m>=60) { h=m/60 ; m=m%60 } if (h>=24) { d=h/24 ; h=h%24 } printf ("%04i:%02i:%02i:%02i: %s\n",d,h,m,s,$0) } Doing math on units of time larger than days doesn't make sense since months and years do not have fixed/static sizes. So 4 digits for days gives you over 27 years of possible uptime. Should be enough... ;) It's possible to have it consult a calander or the date syscall I guess and piece together that X seconds ago was Y years/months/days/... ago, but I don't think that would make an especially useful piece of data. "3 months and 2 days" is a different actual length of time depending on which particular months and years they were. -- Brian K. White brian@aljex.com http://www.myspace.com/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org