Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-31T21:47:11.337Z
Answers.LastActivityDate: 2020-03-31T21:47:11.337Z
Answers.UserDisplayName: aerijman
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-01T04:49:54.843Z
Comments.Text: Shell expands wildcards, try `ls *` vs  `ls "*"` .
Comments.UserDisplayName: pditommaso
Tags: <nextflow>
Title: nextflow `fromPath` not passing all files with *
ThreadText: # 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](https://www.nextflow.io/docs/latest/channel.html#frompath), 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
  
  ```
  
  
  ---
  
  