6 Replies Latest reply on Jan 28, 2011 6:00 AM by Angel Garcia Esteban

    Ctrl-M's on Windows NSH scripting

    Gerardo Bartoccini


      I need to append the string “cmd” into a plain text file on Windows from a Linux appserver.

      For some reasons, the target file is Unix-formatted, i.e. it doesn’t contain the Ctrl-M’s at the end of the lines.

      Whatever I tried from NSH puts a Ctrl-M at the end of my string:


      echo "cmd\c\n" >> /C/Temp/test.txt


      nexec -e cmd /C echo cmd >> C:\\Temp\\test.txt


      printf "%s\n" cmd >> /C/Temp/test.txt


      Any clues?