I'm currently implementing a shell and would like to mimick the behavior of globbing according to well-known shells.

Suppose that there is a command `foo` that takes two filename arguments. That is:

```bsh
foo file1.txt file2.txt

```

is correct usage. Also suppose that we have the following files in the current directory.

```
file1.txt
file2.txt
file3.txt

file1.dat
file4.dat

```

Is it possible to use multiple glob arguments when executing the command in a shell (say Bash)? For instance,

```bsh
foo *.txt *.dat

```

If so, what does this even mean or evaluate to? I would like to know which combinations would be executed as in:

```bsh
foo file1.txt file1.dat
foo file2.txt file4.dat
...

```

Thanks in advance!