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
- What is newline character — ‘\n’
- Why does ENOENT mean “No such file or directory”?
- Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
- How do I grep recursively?
- convert Hsl to rgb and hex
- In the shell, what does ” 2>&1 ” mean?
- How do I copy a folder from remote to local using scp?
- grep –ignore-case –only
- What does cmd /C mean?
- What are .a and .so files?
- How do I call git diff on the same file between 2 different local branches?
- How do I use grep to search the current directory for all files having the a string “hello” yet display only .h and .cc files?
- SSH using python script
- Why do JVM arguments start with “-D”?
- How do I import an SQL file using the command line in MySQL?
- What is a bus error? Is it different from a segmentation fault?
- Command Prompt “Net View System Error 6118”
- Windows 7 Symbolic Link – Cannot create a file when that file already exists
- How to make and apply SVN patch?
- How do I make a python script executable?
- How to download a file from server using SSH?
- Run C++ in command prompt – Windows
- Get Unix timestamp with C++
- Run R script from command line
- How to edit a py file from terminal?
- Colorizing text in the console with C++
- Is there any simple way to benchmark Python script?
- Command Prompt Error ‘C:\Program’ is not recognized as an internal or external command, operable program or batch file
- Run Command Prompt Commands
- What is %0|%0 and how does it work?
- How can I see the changes in a Git commit?
- npm install multiple package names
- Syntax error near unexpected token ‘then’
- Android Color Picker
- Shell script not running, command not found
- Command prompt won’t change directory to another drive
- git-diff to ignore ^M
- Reaching EOF with fgets
- Difference between sh and Bash
- What are the uses of the exec command in shell scripts?
- How to set text color for my d3 chart title?
- Timeout a command in bash without unnecessary delay
- Run function from the command line
- how do u change the link color of one specific link in wordpress?
- wp-cli displays php notices when display errors off
- How to disable XML-RPC from Linux command-line in a total way?
- Do you have to have command line access to use Subversion with WordPress?
- How to retrieve text only from a post using WP CLI?
- wp search-replace (not executing)
- Other than WP-CLI, is there a way to install WordPress via the command-line?
- Running custom defined WP-CLI commands without WordPress installation present
- How can I list all installed plugins/themes/versions from CLI/API?
- Using the WP CLI to output the HTML results of calling a post?
- How to remove all plugins, posts, pages, and inactive themes in one line with wp-cli? WordPress bloatware removal
- bash script wp-cli search-replace 0 replacements, but command-line 3000+
- How do I get the current Unix time in milliseconds in Bash?
- Copying a large directory tree locally? cp or rsync?
- How do diff over ssh?
- SSL Certificate Location on UNIX/Linux
- How to forcibly close a socket in TIME_WAIT?
- Can you have more than one ~/.ssh/config file?
- Difference between `curl -I` and `curl -X HEAD`