<p>I have a simple linux script:</p>

<pre><code>#!/bin/sh
for i in `ls $1`
do
       echo $i
done
</code></pre>

<p>In my temp folder are 4 file: a.a, a.aa, a.ab and a.ac</p>

<p>When i call ./script temp/*.?? i get:</p>

<pre><code>temp/a.aa
</code></pre>

<p>When i call ./script "temp/*.??" i get:</p>

<pre><code>temp/a.aa
temp/a.ab
temp/a.ac
</code></pre>

<p>Why do the double quote change the result?</p>

Because without the quotes the shell is expanding your call to:
```
```
./script temp/a.aa temp/a.ab temp/a.ac
```
```
So
```
$1
```
is
```
temp/a.aa
```
instead of
```
temp/*.??
```
.