
If TYPE is text, grep processes a binary file as if it were text this is equivalent. If TYPE is without-match, grep assumes that a binary file does not match this is equivalent to the -I option. Most probably your input files contain some unreadable characters.ĭiff <(sed ‘1d’ ‘todayFile.txt’ | sort ) <(sed ‘1d’ yesterdayFile. By default, TYPE is binary, and grep normally outputs either a one-line message saying that a binary file matches, or no message if there is no match. In addition, two variant programs egrep and fgrep are available. By default, grep prints the matching lines. Add -a switch to grep to make it treat the file a readable text. Grep searches the named input FILE s (or standard input if no files are named, or the file name - is given) for lines containing a match to the given PATTERN. Grep scans the file, and if it finds any unreadable characters, it assumes the file is in binary. Warning: grep –binary-files=text might output binary garbage, which can have nasty side effects if the output is a terminal and if the terminal driver interprets some of it as commands. If TYPE is text, grep processes a binary file as if it were text this is equivalent to the -a option. We’ve used two options to tell the grep command to do that: -R will search files recursively. By default, TYPE is binary, and grep normally outputs either a one-line message saying that a binary file matches, or no message if there is no match.

If the first few bytes of a file indicate that the file contains binary data, assume that the file is of type TYPE.

Process a binary file as if it were text this is equivalent to the –binary-files=text option.
