I have an .ods file. I need to search said file for keyword and need the result to reflect the entire row, not just the cell containing the keyword. Here is the file in question:
RO JOB REPAIR TIME
224576 1 DASH HARNESS 26.3
224577 5 APIM FLASH 1.5
224578 3 SUNROOF 11.9
224579 9 OIL CHANGE 0.3
I found a script called odfgrep here that works well, but the results returned are only the cell containing the keyword:
./odfgrep DASH FEB23.ods
DASH HARNESS
What I would like to see, is the entire row, preferably with the header:
./odfgrep DASH FEB23.ods
RO JOB REPAIR TIME
224576 1 DASH HARNESS 26.3
Side note, I intend to incorporate this with a zentity script. I've had issues in the past with people not understanding my question. If this is not clear enough, please do not close, give me a chance to fix it, and please offer some pointers as to where it is unclear. Thanks.
The below adaptation of odfgrep shows the full line, separating cells with comma (in your example you may grep on "\(REPAIR\|DASH\)" then you may pipe to sed or other to have a different separator)