Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3043

Command line arguments containing * (asterisk) not passed correctly

    XMLWordPrintableJSON

Details

    Description

      Groovy does weird things with command line arguments containing *. Makes it very difficult to pass in things like file specs, ant specs and regex expresssions!!! A simple program that prints out the length of the args parameter passed into main procedure - a few are correct but most are wrong:

      >groovy fail test
      args length: 1
      
      >groovy fail *
      args length: 3
      
      >groovy fail **
      args length: 0
      
      >groovy fail "**"
      args length: 0
      
      >groovy fail "test"  " *"
      args length: 2
      
      >groovy fail "test"  "*"
      args length: 1
      
      >groovy fail "test   *"
      args length: 1
      
      >groovy fail "*test*"
      args length: 0
      
      >groovy fail "*test*"
      args length: 0
      
      >groovy fail " *test*"
      args length: 1
      

      Attachments

        1. startGroovy_V1.bat
          7 kB
          herbert welker
        2. startGroovy_V2.bat
          5 kB
          herbert welker

        Activity

          People

            blackdrag Jochen Theodorou
            bob.swift Bob Swift
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: