Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
9
Task/Find-duplicate-files/Jq/find-duplicate-files.jq
Normal file
9
Task/Find-duplicate-files/Jq/find-duplicate-files.jq
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# The following jq program assumes the input consists of a JSON array of objects having
|
||||
# keys named "hash" and "filename".
|
||||
def dictionary(stream; f; g):
|
||||
reduce stream as $x ({}; .[($x|f)] += [$x|g]);
|
||||
|
||||
dictionary(inputs[]; .hash; .filename)
|
||||
| to_entries[].value
|
||||
| select(length > 1)
|
||||
| [.[]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue