Close

Using sdiff like a pro

My colleague Kiran Patel, has showed me this really cool command:

Announcement

I have released my new course on Udemy, Kubernetes By Example. Sign up now to get free lifetime access!
superdiffcommand='systemctl list-units --type=service | grep running' && sdiff -w 200 <(ssh box1.com $superdiffcommand) <(ssh box2.com $superdiffcommand)

If the command you want to run requires root priveleges, then you can do:

superdiffcommand='sudo systemctl list-units --type=service | grep running' && sdiff -w 200 <(ssh -t box1.com $superdiffcommand) <(ssh -t box2.com $superdiffcommand)