aboutsummaryrefslogtreecommitdiff
path: root/bin/extract-cids
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2022-10-27 14:14:40 +0300
committerkaotisk <kaotisk@arching-kaos.org>2022-10-27 14:14:40 +0300
commit06c1e6bf576bd36f8fde0b5be6200c79a387cfa8 (patch)
tree2df4855f4ec99ab5de3ba3a27c9744f07293d8d7 /bin/extract-cids
parentec812d4606fcda595448967b04ec6ee59ecba979 (diff)
downloadarching-kaos-tools-06c1e6bf576bd36f8fde0b5be6200c79a387cfa8.tar.gz
arching-kaos-tools-06c1e6bf576bd36f8fde0b5be6200c79a387cfa8.tar.bz2
arching-kaos-tools-06c1e6bf576bd36f8fde0b5be6200c79a387cfa8.zip
Better implementation that doesn't produce splitted CIDs
Diffstat (limited to 'bin/extract-cids')
-rwxr-xr-xbin/extract-cids8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/extract-cids b/bin/extract-cids
index ec91fb0..06b7ebc 100755
--- a/bin/extract-cids
+++ b/bin/extract-cids
@@ -1,2 +1,8 @@
#!/bin/bash
-enter | jq | grep Qm | sed -e 's/^.*Qm/Qm/g' | cut -d '"' -f 1
+#
+# Extracts unique IPFS CIDs from an entered zchain
+#
+# Previously:
+# enter | jq | grep Qm | sed -e 's/^.*Qm/Qm/g' | cut -d '"' -f 1
+#
+enter | jq | grep Qm | sed -e 's/".*"://g; s/ //g; s/[{,"]//g' | sort | uniq