In emacs, we can view two text files side by side.
Is it also possible to do so in some simpler/lighter applications such as less
?
Only viewing, no editing.
diff()text;
In emacs, we can view two text files side by side.
Is it also possible to do so in some simpler/lighter applications such as less
?
Only viewing, no editing.
Best Answer
The
less
command by itself cannot do any diff'ing. You can use thediff -y
command to show the diff of 2 files side-by-side and then pipe that intoless
however.Method #1 - using diff + less
This will create 2 sample files.
Now diff the 2 files:
Method #2 - using vimdiff
You can also use
vimdiff
in readonly mode,-R
.