relpipe-data/examples/runnable-jars.sh
author František Kučera <franta-hg@frantovo.cz>
Sun, 09 May 2021 19:43:32 +0200
branchv_0
changeset 324 3cbce8bb28c3
parent 294 abbc9bcfbcc4
child 329 5bc2bb8b7946
permissions -rwxr-xr-x
relpipe-tr-sql and relpipe-in-sql --list-data-sources option has boolean parameter since v0.18

#!/bin/bash

findFiles() {
	find ~/.m2/ -iname '*.jar' -printf '%p\0';
}

fetchAttributes() {
	relpipe-in-filesystem \
		--parallel 4 \
		--file path \
		--streamlet jar_info;
}

filterRunable() {
	relpipe-tr-awk --relation '.*' --where 'main_class';
}

shortenPath() {
	relpipe-tr-sed '.*' 'path' "^$HOME/?" "~/";
}

findFiles | fetchAttributes | filterRunable | shortenPath | relpipe-out-tabular