Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-5104

In JBoss Fuse shell, when running grep, there will be 3 ANSI reset sequence on each line.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • jboss-fuse-6.3
    • jboss-fuse-6.2.1
    • Karaf
    • % %
    • 6.3 Sprint 4 (Mar 28 - Apr 29)

    Description

      This affect every script when using grep b/c we will have to do something to remove the ANSI reset char first..

      Here is an example to demostrate the problem (the intent is to print the final 5 characters in the value)

      JBossFuse:karaf@root> testVal = ( list | grep --color never "CSV" | tac )
      [ 212] [Active     ] [            ] [       ] [   50] Apache Commons CSV (1.1.0)
      JBossFuse:karaf@root> ( $testVal length )
      83
      JBossFuse:karaf@root> ( $testVal charAt 79 )
      )
      JBossFuse:karaf@root> ( $testVal charAt 80 )
      �
      JBossFuse:karaf@root> ( $testVal charAt 81 )
      [
      JBossFuse:karaf@root> ( $testVal charAt 82 )
      m
      

      This is the code shows the reset chars are added....

      https://github.com/apache/karaf/blob/43d8cd0ae2368ce40465ea5511c5c150ec82e275/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/GrepAction.java#L144

      Attachments

        Activity

          People

            pantinor@redhat.com Paolo Antinori
            rhn-support-whui Roger Hui
            Jan Kasztura Jan Kasztura (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: