Man pages for diff
suggest no solution for colorization from within itself. Please consider using colordiff
. It’s a wrapper around diff
that produces the same output as diff, except that it augments the output using colored syntax highlighting to increase readability:
diff old new | colordiff
or just:
colordiff old new
Installation:
- Ubuntu/Debian:
sudo apt-get install colordiff
- OS X:
brew install colordiff
orport install colordiff
Related Posts:
- How to colorize diff on the command line
- How to pretty print XML from the command line?
- mkdir’s “-p” option
- What are file descriptors, explained in simple terms?
- How to kill a process running on particular port in Linux?
- Display exact matches only with grep
- How to split a delimited string into an array in awk?
- Display exact matches only with grep
- What does ^M character mean in Vim?
- What does it mean to write to stdout in C?
- What do ‘real’, ‘user’ and ‘sys’ mean in the output of time(1)?
- Given two directory trees, how can I find out which files differ by content?
- wait(null) and wait(&status) C language and Status
- Shell script “for” loop syntax
- Diff command along with Grep gives “Binary file (standard input) matches”
- What is cp: cannot stat error in Unix, I get this error when trying to copy thing from one folder to another
- How to get the current directory in a C program?
- When could or should I use chmod g+s on a file or directory?
- How to Sum a column in AWK?
- What is cp: cannot stat error in Unix, I get this error when trying to copy thing from one folder to another
- Equivalent of *Nix ‘which’ command in PowerShell?
- What is the difference between SIGSTOP and SIGTSTP?
- How to read a file into a variable in shell?
- gpg decryption fails with no secret key error
- What is the difference between tar and zip?
- Display current path in terminal only
- What do the dup() and dup2() systems really do?
- What generates the “text file busy” message in Unix?
- Reasoning behind C sockets sockaddr and sockaddr_storage
- How can I send an email through the UNIX mailx command?
- Rename multiple files based on pattern in Unix
- What is the difference between a symbolic link and a hard link?
- SCP Permission denied (publickey). on EC2 only when using -r flag on directories
- binary operator expected error when checking if a file with full pathname exists
- What is special about /dev/tty?
- How do I do ‘mount –bind’ in /etc/fstab?
- How to read backward from the end of file in less or more?
- Getting the last match in a file using grep
- Convert hex color to RGB values in PHP
- “No such file or directory” but it exists
- How do I pause my shell script for a second before continuing?
- Node.js version on the command line? (not the REPL)
- In the shell, what does ” 2>&1 ” mean?
- How do I grep recursively?
- What does cmd /C mean?
- https connection using CURL from command line
- syntax error when using command line in python
- How do I grep recursively?
- How to install JQ on Mac on the command line?
- What is the difference between read and pread in unix?
- How can I exclude directories from grep -R?
- How to reload .bash_profile from the command line?
- Angular – ng: command not found
- How to run SQL script in MySQL?
- Argument list too long error for rm, cp, mv commands
- How can I pass an argument to a PowerShell script?
- Difference between using “chmod a+x” and “chmod 755”
- What does WEXITSTATUS(status) return?
- What does the line “#!/bin/sh” mean in a UNIX shell script?
- jQuery animate backgroundColor
- OSError – Errno 13 Permission denied
- What can cause a “Resource temporarily unavailable” on sock send() command
- possible lossy conversion from long to int?
- RGB to hex and hex to RGB
- Python not working in the command line of git bash
- What is the reason for the CD /D switch in Windows cmd?
- Running Command Line in Java
- How to compare a local Git branch with its remote branch
- Sorting data based on second column of a file
- How can I change the color of my prompt in zsh (different from normal text)?
- phpmyadmin #1045 Cannot log in to the MySQL server. after installing mysql command line client
- Hex colors: Numeric representation for “transparent”?
- omparing the contents of two files in Sublime Text
- Understanding BufferedImage.getRGB output values
- Using grep and ls -a commands
- How do I change the font color in an html table?
- How do I write stderr to a file while using “tee” with a pipe?
- How do I show the changes which have been staged?
- cd into directory without having permission
- set background color: Android
- Python – difference between two strings
- Initialize WordPress environment to use in command line script
- How to use command ‘wp post create’ in wp-cli properly?
- How do I delete all generated images from my server except those currently used in posts
- How do I set and list page_template with wpcli?
- Run W3 Total Cache Flush Function with Crontab [closed]
- Shortest way to install WP-CLI
- WP Cli will not execute on Windows
- How can I use PurifyCSS to clean WordPress style.css?
- How to run a php file that uses wordpress functions from command line?
- Get plugin download URL from slug
- Carriage Return control character (^M) found in wp-config-sample.php
- Can I nohup/screen an already-started process?
- Environment variables of a running process on Unix?
- In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?
- Is it possible to detach a process from its terminal? (Or, “I should have used screen!”) [duplicate]
- Meaning of directories on Unix and Unix like systems
- How can I rename a Unix user?
- How to get pid of just started process
- How can I get diff to show only added and deleted lines? If diff can’t do it, what tool can?