Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k
added 15 characters in body
Source Link
slm
  • 379.8k
  • 127
  • 793
  • 897

Remove ^M character from log files.

In my script iI redirect output of my program to a log file The. The output of my log file contains some ^M (backspacenewline) charcharacters. I I need to remove itthem while running itself.

myMy command java -jar test.jar >> test.log:

$ java -jar test.jar >> test.log 

test.logtest.log has Starting script ... ^M Starting script ...Initializing:

Starting script ... ^M Starting script ...Initializing

Remove ^M character from log files.

In my script i redirect output of my program to a log file The output of my log file contains some ^M (backspace) char. I need to remove it while running itself.

my command java -jar test.jar >> test.log

test.log has Starting script ... ^M Starting script ...Initializing

Remove ^M character from log files.

In my script I redirect output of my program to a log file. The output of my log file contains some ^M (newline) characters. I need to remove them while running itself.

My command:

$ java -jar test.jar >> test.log 

test.log has:

Starting script ... ^M Starting script ...Initializing

Source Link
Ram
  • 1.1k
  • 2
  • 16
  • 20

Remove ^M character from log files

Remove ^M character from log files.

In my script i redirect output of my program to a log file The output of my log file contains some ^M (backspace) char. I need to remove it while running itself.

my command java -jar test.jar >> test.log

test.log has Starting script ... ^M Starting script ...Initializing