I’m testing egrep in command line but I can’t get any results. Here’s my input in command line. I want to find some pattern in the file:
egrep -i 'this is' C:\regExp\file.txt
After I press Enter nothing is printed. Why? How to make it print results?
If your files are in Unicode format, your expression will not match, because the characters in the file occupy 2 bytes instead of just one. Such a file would look like this
rather than this
in a hex editor.
Open the file in Notepad, then click
File > Save As...and check theEncodingfield at the bottom of the dialog. If the file is Unicode encoded, the valueUnicodewill be preselected.