Highlighted
New Member.
965 views

Quick scan of IDXFORMAT "8" files

Jump to solution

I am running on Redhat and years ago when I had my data files with the index info split out I could do a "grep" of the data portion. Now when I try to quickly scan for something I get "Binary file X.LDF matches"

Any suggestions?  I know I can use ODBC connectors and I do, but just looking for a quick utility like I used to have.

Thanks for any suggestions.

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Quick scan of IDXFORMAT "8" files

Jump to solution

strings -a filename | grep pattern

There's also the --text option to (GNU) grep, which forces it to treat the file as text, but that's likely to spew a bunch of control characters to the terminal, since the file is not, in fact, text. Using strings is a better bet.

View solution in original post

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Quick scan of IDXFORMAT "8" files

Jump to solution

strings -a filename | grep pattern

There's also the --text option to (GNU) grep, which forces it to treat the file as text, but that's likely to spew a bunch of control characters to the terminal, since the file is not, in fact, text. Using strings is a better bet.

View solution in original post

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Quick scan of IDXFORMAT "8" files

Jump to solution

I should note I'm assuming here the text data in your file is ASCII or UTF-8. If it's some other character encoding, "strings" won't recognize it. (Though it's possible GNU strings has support for other encodings; I haven't checked.)

0 Likes
Highlighted
New Member.

RE: Quick scan of IDXFORMAT "8" files

Jump to solution

Thanks Michael - I think strings will do the trick for me

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.