Created
April 7, 2025 16:07
-
-
Save pwfcurry/f2e6ae7e8aac0ea0924dd148b99797e2 to your computer and use it in GitHub Desktop.
Compare lines in a jsonp file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set line_count (wc -l < data.jsonp) | |
set i 1 | |
while test $i -lt (math $line_count + 1) | |
echo "Comparing lines $i and $(math $i + 1)" | |
diff (sed -n "$i"p data.jsonp | jq --sort-keys . | psub) (sed -n (math $i + 1)p data.jsonp | jq --sort-keys .| psub) | |
echo "----------------------------------------" | |
set i (math $i + 1) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment