It's possible some kind of character set problem is throwing things off for you. Here are some commands you should be able to use to re-create a successful usage of grep that may help you.
First let's make a text file in the terminal to avoid any character set problems:
echo -e "Hello\nHallo" > foo.txt
The -e flag tells echo we want the \n to be interpreted as a newline, and not the literal sequence. This gives us two lines. You should be able to cat the file and see it without any issue, like this:
cat foo.txt
Hello
Hallo
Now you can use the grep command you posted before (it doesn't actually need quotes, but you should use them as there are special characters in bash. Also, single quotes not double quotes)
grep -i 'h[ae]llo' foo.txt
This produces the expected result. If this worked for you, but you are curious as to what is going on with your other text file, you can do a few things to figure out what is going on.
First, try running the file command on the file. This should tell you it's a text file, and what encoding it appears to be in.
file foo.txt
foo.txt: ASCII text
If you get something strange or in a different character encoding, that's going to be a problem. You can also inspect the hexidecimal dump of the file by:
hexdump -C foo.txt
00000000 48 65 6c 6c 6f 0a 48 61 6c 6c 6f 0a |Hello.Hallo.|
0000000c
Also as a bonus here is a in-browser Linux emulator you can use that might help you toy around:
http://bellard.org/jslinux/
It even has GCC so you can compile C code!
grep -i 'h[ae]llo' hello.txtgrepare you using(grep --version)? What shell are you using? Are you grepping the correct file?shopt nullglob?halloand one namedhelloin the pwd, but how would the nullglob option affect it?