Anon
06/14/2024 (Fri) 15:35
No.10457
del
Huh, I thought that an if statement like the following in sh wasn't POSIX-compliant. Guess I was thinking of something else - maybe double square brackets?
$ ipfs ls -s \
bafybeifdw3oaaxcdfv5w3zxd4k7btczdcqq75562b3foosfhntspchbbnq/torrents/by_infohash/0a28fe146ed6d80f2e5f2921f1cd39400aa794b2/Ponibooru-Select-Safe \
| head -n80 | grep "^bafk" | awk '{print $1" "$2}' | xargs -d "\n" sh -c \
'for args do cid=$(echo "$args" | sed "s/ .*//g"); \
size=$(echo "$args" | sed "s/.* //g"); if [ $size -lt 150000 ]; then echo $cid; ipfs get $cid; fi; done' _
Pics related