Monitoring, Management & Location Tracking

 View Only
last person joined: one year ago 

Articles relating to existing and legacy HPE Aruba Networking products and solutions including AirWave, Meridian Apps, ALE, Central / HPE Aruba Networking Central, and UXI / HPE Aruba Networking User Experience Insight

grep: Binary file [some_file] matches 

Jul 01, 2014 02:47 AM

If you try to grep a file and you get something like the following:

Binary file [some_file] matches

...this is what's happening...

[from the grep man page]

Normally, if the first few bytes of a file indicate that the file contains binary data, grep outputs only a message saying that the file matches the pattern.

To force the file to be treated as text, use the -a (or --text) option.

Example:
# grep -a pattern some_file

This option causes grep to act as if the file is a text file, even if it would otherwise be treated as binary.

NOTE: the result might be binary garbage printed to the terminal, which can have nasty side-effects if the terminal driver interprets some of it as commands.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.