I am outputting results from an android shell command to a file, with MS-windows cmd via ADB.exe.
It outputs the correct results, but I am getting an extra line between each result. It looks normal in interactive cmd (without extra lines), but when it is saved to a file the additional lines show up.
I am using Notepad++ to view the file output. When viewing all symbols, it is showing a CR(carriage return) at the end of each printed line and a CR LF for each blank line.
Is it possible to output the results to a file without the extra lines, and if so what could be causing this?
Interactively, output direct to terminal
D:\>adb shell "ls -l"
drwxr-xr-x root root 2009-12-31 19:00 acct
drwxrwx--x system cache 2020-03-12 07:14 cache
lrwxrwxrwx root root 1969-12-31 19:00 charger -> /sbin/healthd
dr-x------ root root 2009-12-31 19:00 config
Redirecting to file
D:\>adb shell "ls -l" > test.log
drwxr-xr-x root root 2009-12-31 19:00 acct
drwxrwx--x system cache 2020-03-12 07:14 cache
lrwxrwxrwx root root 1969-12-31 19:00 charger -> /sbin/healthd
dr-x------ root root 2009-12-31 19:00 config
test.log
file, you will see that it contains extra carriage-returns.