I am trying to extract contents of a file between specified time stamp. but it does not seem to work. i am trying to extract output of /var/adm/messages between 15:00:00 to 15:23:59 .
i have tried two regex the first one seems to kind of work. it displays some output. the second one is complete blank. Please help me
The man's question (from what I understood ) was why his command doesn't provide the desired output and not what other command could provide the desired output.
I am not asking chidori to use a different command but the same command with an additional option with the regex untouched. By the way, have you tried your regex? I don't think it works.
The IREs don't require escaping in grep (unlike may be in sed).
but why not egrep 'May 29 15:[0-9]{2}:[0-9]{2}' /var/adm/messages ???
Please if some one has some details one the regex compatibility table with unix tools ( e.g. grep , grep , sed , awk , nawk and so ) that would be much helpful
SUNWcsu is a core solaris package and grep an egrep and the others (/usr/bin/..) packages belong to that.
SUNWxcu4 utilities are like an enchanced the core utilities with XCU4(i m not sure but is is extendend core utilities) specifications..
These commands are an XPG4(X/Open Portability Guide) superset of Posix standarts from previous superset (XPG3)..
These packages are improved by the X/Open Company, Ltd and adapted to Sun (Sparc and x86 for Sun) platforms by the Oracle (Sun Microsystems ).
so the other name is X/Open Commands & Utilities..
and XCU4 utulities are placed in the "/usr/xpg4/bin" folder for prevent the conicts with existing Solaris behavior and these are suitable the POSIX.2 standarts.