Hacker News new | ask | show | jobs
by jalfresi 3893 days ago
Actually this is closer still to the output. Requires colordiff:

diff -u <(curl -sS -D - -L https://httpbin.org/get) <(curl -sS -D - -L https://httpbin.org/get?show_env=1) | colordiff

2 comments

You can replace colordiff with vim's less tool (/usr/share/vim/vim74/macros/less.sh ) or vimpager (https://github.com/rkitover/vimpager).

icdiff is also nice to have a side-by-side colored diff (https://github.com/jeffkaufman/icdiff). And of course, you could use meld, vimdiff, kompare etc. with the same bash anonymous pipes indirection.

you can leave off the pipe: colordiff -u <(curl -sS -D - -L https://httpbin.org/get) <(curl -sS -D - -L https://httpbin.org/get?show_env=1)