Sorry, that's not good as you have to specify an existing start and end, ie. .3 and .22. I have no better idea atm, but I bet someone will come up with a better code soon.
Your code doesn't work because [1,22] is not a range in regular expressions. Afaik it would be written [1-22] but I don't get it working either
Yeah, forgot to mention that I tried the [1-22] and it didn't work for me either. I am on a SunOS 5.10.
The sort command works, thanks for that. Unfortunately I will have to eventually parse very large syslog files and I imagine that's not so efficient and fast