Karaf
  1. Karaf
  2. KARAF-718

Grep doesn't work when piped from features:listurl

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.3, 3.0.0
    • Component/s: karaf-shell
    • Labels:
      None

      Description

      features:listUrl writes its output to the console using session.getConsole().println() instead of System.out.println(). The GrepAction.java wraps System.in in a BufferedLineReader() in order to grab the output of the preceding command. Because features:listurl doesn't write anything to the System, grep has nothing to filter. The fix for this is to change all instances of session.getConsole().println() in ListUrlcommand.java with System.out.println(). I will be submitting a patch for this shortly.

      1. karaf-718.txt
        1 kB
        Michael Van Geertruy

        Activity

        Michael Van Geertruy created issue -
        Hide
        Michael Van Geertruy added a comment -

        Patch changing session.getConfig().println() to System.out.println() to all the use of follow-on commands like grep.

        Show
        Michael Van Geertruy added a comment - Patch changing session.getConfig().println() to System.out.println() to all the use of follow-on commands like grep.
        Michael Van Geertruy made changes -
        Field Original Value New Value
        Attachment karaf-718.txt [ 12485794 ]
        Jean-Baptiste Onofré made changes -
        Assignee Jean-Baptiste Onofré [ jbonofre ]
        Jean-Baptiste Onofré made changes -
        Fix Version/s 2.2.3 [ 12316685 ]
        Fix Version/s 3.0.0 [ 12316040 ]
        Component/s console [ 12313723 ]
        Hide
        Jean-Baptiste Onofré added a comment -

        Fixed on trunk: revision 1144612.

        Show
        Jean-Baptiste Onofré added a comment - Fixed on trunk: revision 1144612.
        Hide
        Jean-Baptiste Onofré added a comment -

        Fixed on karaf-2.2.x: revision 1144613.

        Show
        Jean-Baptiste Onofré added a comment - Fixed on karaf-2.2.x: revision 1144613.
        Jean-Baptiste Onofré made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jamie goodyear made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Michael Van Geertruy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development