Bram Moolenaar wrote:
Tony Mechelynck wrote:

        echo string1 >  file
        echo string2 >> file
        echo string3 >> file
etc.

ought to work, _except_ when the string is (ignoring case) ON OFF or empty (in which case you will set, clear or display the echo on/off setting instead of writing / appending to the file). People were using it in batch files in Dos from time immemorial, with shells which didn't know about inline documents.

You are apparently reading documentation.  Does it also say something
about having > and < characters in the string?  That may be the cause of
the problem:

        @echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes"?^> >$@
        @echo ^<assembly xmlns="urn:schemas-microsoft-com:asm.v1" 
manifestVersion="1.0"^> >>$@


The ^ character is apparently used to escape the special meaning of >
and <.


ah, that may depend on the shell version; I expect that old shells might not know about it. Maybe inline documents (handled by the make utility) might be better then? Of course, we are back to whether old versions of nmake support them.


Best regards,
Tony.

Reply via email to