[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?



On Sat, 1 Apr 2023 Susmita/Rajib wrote:
[   ...   ]
Try

icdiff file1 file2 | less -R

and report back.
[   ...   ]

Yes, it worked. Worked better than the code-line with " | more".
Mouse-scrolling working both ways. So really thank you.

My need should have been fulfilled so far as the purpose of the
present thread is concerned. But I have another immediately related
query: how could I capture the output from the code-line with all
its colours to a file on the HDD?

The "colors" are control sequences, instructions for terminal
emulators conforming to a standard. Terminals understand them to mean
"now paint glyphs red" or "now make them bold" or "now stop doing all
that fancy stuff" etc.

Then repeated invoking the line won't be required.  "> file.txt"
drops all colours.

You do not tell us what application you are using to view the file
contents. If it is not a terminal application, it might well fail to
independently implement for your delightful spectation the ECMA-48 set
graphics control sequences.

Applications that transparently pass such sequences to a terminal
permit it to paint the glyphs as the control sequences direct.

 $ icdiff file1 file2 > pretty_diff
 $ less -R pretty_diff # Still pretty?

--
Believe you do in the church, not in front of the computer, when
we see the output we can conclude ourself. -- deloptes


Reply to: