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

        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.
        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.

          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