You could run ‘unix2dos’ on the file (it’s a linux command, not nsh)
So you wont to update the file on the Windows box, and it doesn't have ^M at the end of the lines and should not have, right?
try with something like this:
nexec ??TARGET.NAME?? cmd /c ... | tr '\r' '\n' | ...more NSH commands... >> ...
Let me know if it runs fine.
Two possible (tested) solutions:
1) Copying the file back to appserver, running dos2unix then copying it back.
2) Using echo -n
Thanks everybody for your help
Olivier, the file originally doens't have any ^M's.
The line I append has got a ^M at the end, which I don't want.
echo -n solved the issue
but if you need more than a "echo" command, you will need the tr command :
... | tr '\r' '\n' ...