<p>got it!</p>

<p>I should run:</p>

<pre><code>nextflow run main.nf --input "*bam"
</code></pre>

<p>instead of </p>

<pre><code>nextflow run main.nf --input *bam
</code></pre>

CC BY-SA 4.0
2020-03-31T21:47:11.337Z
2020-03-31T21:47:11.337Z
aerijman
<p>main.nf is </p>

<pre><code>#!/usr/bin/env nextflow

params.input = ''
tchan = Channel.fromFile(params.input)

tchan.println()
</code></pre>

<p>I have a.bam, b.bam and c.bam  </p>

<p>I run: </p>

<pre><code>nextflow run main.nf --input *bam
</code></pre>

<p>But it only prints <code>a.bam</code></p>

<p>According to the <a href="https://www.nextflow.io/docs/latest/channel.html#frompath" rel="nofollow noreferrer">documentation</a>, wildcard character it is interpreted as a glob path matcher</p>

<p>What am I doing wrong?</p>

<p>Thank you </p>

CC BY-SA 4.0
2020-04-01T04:49:54.843Z
Shell expands wildcards, try `ls *` vs  `ls "*"` .
pditommaso
<nextflow>
nextflow `fromPath` not passing all files with *
# nextflow `fromPath` not passing all files with *

(Asked by: username_0 on 2020-03-31)

main.nf is 
#!/usr/bin/env nextflow

params.input = ''
tchan = Channel.fromFile(params.input)

tchan.println()

I have a.bam, b.bam and c.bam  
I run: 
nextflow run main.nf --input *bam

But it only prints a.bam
According to the documentation, wildcard character it is interpreted as a glob path matcher
What am I doing wrong?
Thank you

**Tags:** nextflow
> **Comments:**
> **username_1**: Shell expands wildcards, try `ls *` vs  `ls "*"` .  

---

## 1 answers

### Answer by username_0 on 2020-03-31. Score: 2 | Accepted answer

got it!
I should run:
nextflow run main.nf --input "*bam"

instead of 
nextflow run main.nf --input *bam


---

