1 Reply Latest reply on May 22, 2020 6:41 AM by Drew Trachy

    nsh make echo ignore \n

    Greinger Longbotton
      Share This:

      We are trying to read a file on NSH with the following content:

      "\npcapwatchdog"

      "\PSWindowsUpdate"

      "\{5278A583-3F69-40FC-9E6A-9CECFE9BDDBA}"

      "\{F00EBA92-3723-4A7E-84BD-5103B41E8EEB}"

       

      To read the file we run the following NSH script:

       

      for TASK in `cat $FILE`; do

           echo $TASK

      done

       

      But the output is:

      "

      pcapwatchdog"

      "\PSWindowsUpdate"

      "\{5278A583-3F69-40FC-9E6A-9CECFE9BDDBA}"

      "\{F00EBA92-3723-4A7E-84BD-5103B41E8EEB}"

       

      The command echo is understanding "\n" as a newline. We don't know how to make the echo command to print "\npcapwatchdog".