Replies: 1 comment 3 replies
-
|
To anyone, please feel free to chime in. In my opinion, awk or gawk is a great tool for similar use cases, e.g. when columns are delimited with certain characters (like commas in CSV). There is also a unix tool called |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Folks, I've just discovered ugrep--and it's a marvelous tool. SO rich, with so many capabilities and options. Thanks to all involved.
But I was wondering if there's ever been consideration of adding support to limit text searching to specific columns, as in a structured log file. I have searched the docs, the site, the wiki, and the issues/discussions/pull requests here but find none (not even closed ones).
Of course, that may well point to a deficit in me for even thinking to ask the question. Still, since you offer this Q&A discussions section, I thought I'd ask.
To be clear, I do realize that one might be able to craft a regex. And perhaps the presumption is that if one wants column-based searching, they'll workout a regex and not burden the tool with the work. Fair enough...though not everyone would readily think of a regex as a solution, and still others may find them challenging.
I simply wondered if there may be provision for things like indicating that the file being searched (or one/s within an archive) might be a structured log with some fixed columns, with well-defined columns separators and string delimiters, which might be specified as a configuration for the search.
Since the tool has so (SO!) much flexibility in SO many other ways, it really did surprise me to find that this was not only not an option but not seemingly ever discussed. Again, I throw myself on the mercy of the court if the failing is mine to even ask the question, but there you have it. :-)
Thanks for any thoughts at all, even if they may trickle in only over days, weeks, or months. I hope the discussion may help future readers who may find it.
Beta Was this translation helpful? Give feedback.
All reactions