Bash Script using sdiff to compare content from two remote urls

227 Views Asked by At

I am trying to use a simple bash command to cause the sdiff of two curl requests

$ sdiff -l -w 140 $(curl -s "https:/URL/1/2/thing.php?d=20190202") \
                  $(curl -s "https:/URL/1/2/thing.php?d=20190203")

If I download the two curl requests into files, then sdiff the files it works. is it possible to consolidate into one command?

1

There are 1 best solutions below

1
On BEST ANSWER

You can use process substitution:

sdiff ... <(curl ...) <(curl ...)