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

Add option -a <splitpattern> to allow auto split of lines read when using command-line scripts (via -e)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-6
    • 1.0-RC-1
    • None
    • None
    • Patch

    Description

      When writing one-liners in other scripting languages it is very helpful sometimes to automatically have access to an array containing the current line split according to a pattern. This patch adds a commandline option -a that implements this. It takes on optional parameter, the split pattern. If not used, the split pattern is ' ' (a single space).

      The patched file is GroovyMain.java

      Attachments

        1. GroovyMainAutosplit.patch
          3 kB
          Joachim Baumann

        Activity

          People

            guillaume Guillaume Sauthier
            jbaumann Joachim Baumann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: