I'm trying to grep a log file to only show lines that match a certain session ID. Thus far, it works great. However, when I get the results of my grep command, I'm not getting the entries in the order they appear.
If the log file in the directory has this data:
SESSNUM=4437 login.jsp SESSNUM=4437 welcome.jsp SESSNUM=4437 info.jsp SESSNUM=4437 logout.jsp
And I enter this:
grep SESSNUM=4437 *
I get this information:
SESSNUM=4437 logout.jsp SESSNUM=4437 welcome.jsp SESSNUM=4437 login.jsp SESSNUM=4437 info.jsp
Is there a way to make grep display matching lines in the order they appear in the log file(s)?