I have a directory with contents like this - 

```
vishal.yadav@droid36:~/Shell$ ls
lazy_dog.txt  ls-error.txt  ls-output.txt  ShellCommands.txt TheTimeMachineHGWells.txt  words.txt  words.txt.bak

```

---

First Command
-------------

If I try using `ls | grep *.txt` I get the following output -

```
ShellCommands.txt:                      $ cat > lazy_dog.txt
ShellCommands.txt:                      $ cat lazy_dog.txt
ShellCommands.txt:                      $ cat < lazy_dog.txt
ShellCommands.txt:input from the keyboard to the file lazy_dog.txt. We see that the result is the

```

Second Command
--------------

And if I use `ls | grep .*.txt` I get this as output -

```
lazy_dog.txt
ls-error.txt
ls-output.txt
ShellCommands.txt
TheTimeMachineHGWells.txt
words.txt
words.txt.bak

```

---

Isn't `.*.txt` and `*.txt` one and the same?

In the **First Command**, is the output of `ls` the `regex` for `grep` or is it the `list of files`?
Similarly, for the **Second Command**, is the output of `ls` the `regex` or `list of files`?