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?
- Transparent ARGB hex value
- Error unable to access jarfile C:\Jar
- Node.js version on the command line? (not the REPL)
- 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)
- sudo: npm: command not found
- In the shell, what does ” 2>&1 ” mean?
- Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)
- How to find which version of TensorFlow is installed in my system?
- How do I grep recursively?
- How do I grep recursively?
- What is the meaning of *nix?
- 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?
- What does cmd /C mean?
- How do I parse command line arguments in Bash?
- grep –ignore-case –only
- What does cmd /C mean?
- syntax error when using command line in python
- https connection using CURL from command line
- What are .a and .so files?
- syntax error when using command line in python
- How do I grep recursively?
- How to install JQ on Mac on the command line?
- Should you use rgba(0, 0, 0, 0) or rgba(255, 255, 255, 0) for transparency in CSS?
- How can I check if a directory exists in a Bash shell script?
- Using multiple delimiters in awk
- OS X: equivalent of Linux’s wget
- Create an empty file on the commandline in windows (like the linux touch command)
- Connect: Socket operation on non-socket
- Connect: Socket operation on non-socket
- How can I invert color using CSS?
- What is the difference between read and pread in unix?
- How do I call git diff on the same file between 2 different local branches?
- OS X: equivalent of Linux’s wget
- 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
- How can I exclude directories from grep -R?
- How do I import an SQL file using the command line in MySQL?
- How can I exclude directories from grep -R?
- Why do JVM arguments start with “-D”?
- How do I import an SQL file using the command line in MySQL?
- How to reload .bash_profile from the command line?
- What is the purpose of “&&” in a shell command?
- Angular – ng: command not found
- How to run SQL script in MySQL?
- Mysql: Setup the format of DATETIME to ‘DD-MM-YYYY HH:MM:SS’ when creating a table
- 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 is a bus error? Is it different from a segmentation fault?
- What does WEXITSTATUS(status) return?
- Command Prompt “Net View System Error 6118”
- Who can access a file with octal permissions “000” on Linux/UNIX?
- Windows 7 Symbolic Link – Cannot create a file when that file already exists
- What does the line “#!/bin/sh” mean in a UNIX shell script?
- How to cat <
> a file containing code?