2 Replies Latest reply on Jul 1, 2014 12:13 AM by P R

    sed re: NSH Behaviour is different than ZSH

      NSH Outputs:


      SUN%  echo -e 'at\tat'

      at      at


      Here is this command we would like to replace \t with - and print the line like : "at-at"


      however the command seems to treat \t as t and replacing all t in at\tat and output even comes with "TAB" seperator:


      SUN%  echo -e 'at\tat' | sed -re 's/\t/-/g'

      a-      a-


      If I add the escape seperator then it treats \t and dosenot replace \t and pringts the same out put as echo command.


      SUN%  echo -e 'at\tat' | sed -re 's/\\t/-/g'

      at      at

      Attached are the two screenshots from two different consoles "ZSH and NSH outputs"

      My search takes me to below references:




      Kindly help