1

I am running a Angular build using command "ng build" and redirecting output to a text file in Linux machine.

When I open the text file in Linux machine, I can see like below:

Date: 2018-06-06T15:02:32.798Z
Hash: 0f42957c12b1984f5d9d
Time: 177103ms
chunk {common} common.chunk.js, common.chunk.js.map (common) 6.77 MB  [rendered]
chunk {image.module} image.module.chunk.js, image.module.chunk.js.map () 443 kB  [rendered]
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 1.01 MB [initial] [rendered]

but, when I scp the file to Windows machine and while opening it in notepad, I am getting like below:

[0mDate: [1m[37m2018-06-06T15:02:32.798Z[39m[22m[0m
[0mHash: [1m[37m0f42957c12b1984f5d9d[39m[22m[0m
[0mTime: [1m[37m177103[39m[22mms[0m
[0mchunk {[1m[33mcommon[39m[22m} [1m[32mcommon.chunk.js, common.chunk.js.map[39m[22m (common) 6.77 MB [1m[32m [rendered][39m[22m[0m
[0mchunk {[1m[33mimage.module[39m[22m} [1m[32mimage.module.chunk.js, image.module.chunk.js.map[39m[22m () 443 kB [1m[32m [rendered][39m[22m[0m
[0mchunk {[1m[33minline[39m[22m} [1m[32minline.bundle.js, inline.bundle.js.map[39m[22m (inline) 5.83 kB [1m[33m[entry][39m[22m[1m[32m [rendered][39m[22m[0m
[0mchunk {[1m[33mmain[39m[22m} [1m[32mmain.bundle.js, main.bundle.js.map[39m[22m (main) 1.01 MB [1m[33m[initial][39m[22m[1m[32m [rendered][39m[22m[0m

How do I resolve this issue?

Sakthisiga
  • 73
  • 1
  • 2
  • 14
  • These are terminal escape codes to colourize text; see https://github.com/angular/angular-cli/issues/6478 – Benjamin W. Jun 06 '18 at 15:41
  • 1
    Possible duplicate of [How to remove ^\[, and all of the escape sequences in a file using linux shell scripting](https://stackoverflow.com/questions/6534556/how-to-remove-and-all-of-the-escape-sequences-in-a-file-using-linux-shell-sc) – Benjamin W. Jun 06 '18 at 15:43
  • See also this tool: http://invisible-island.net/scripts/readme.html#item:script2log – Benjamin W. Jun 06 '18 at 15:44

0 Answers0