How to use newline character in text in cmd batch?

后端 未结 12 1888
忘掉有多难
忘掉有多难 2020-12-31 07:08

I would like to do

svn commit -m \"\"

But message should have two lines:

Commit by: firstuser
Bug track: 92         


        
12条回答
  •  温柔的废话
    2020-12-31 07:32

    To create a newline in a svn message the best way is the one of aphoria with an extra message-file.

    But it can be done also with the -m

    Sample with a batch file

    @echo off
    SETLOCAL ENABLEDELAYEDEXPANSION
    set lf=^
    
    
    rem ** Two empty lines are neccessary for creating the Linefeed
    svn commit -m "A!lf!Message!lf!with!LF!newline"
    

    You could also use it on the command line

    svn commit -m ^"This is a^
    MORE?
    MORE?my newline"
    

提交回复
热议问题