Reputation: 1393
I need to redirect the command line output to the file without newline in windows.
for example,
"%VISUALSVN_SERVER%bin\svnlook.exe" log -r 128 C:\Repositories > log.txt
The output of this command is just one line. Here i need to redirect the output to log.txt file without newline.
I'm able to echo the variable without newline to the file by following command,
echo | set /p log=log_comments>log.txt
Thanks in advance.
Upvotes: 2
Views: 3356
Reputation: 354864
You can probably use the same trick and a for /f
loop:
for /f %%L in ('"%VISUALSVN_SERVER%bin\svnlook.exe" log -r 128 C:\Repositories') do (
<nul set /p "X=%%L" >log.txt
)
Upvotes: 3