relpipe-data/examples/runnable-jars.sh
author František Kučera <franta-hg@frantovo.cz>
Mon, 21 Feb 2022 01:21:22 +0100
branchv_0
changeset 330 70e7eb578cfa
parent 329 5bc2bb8b7946
permissions -rwxr-xr-x
Added tag relpipe-v0.18 for changeset 5bc2bb8b7946

#!/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 --relation '.*' --attribute 'path' --value "^$HOME/?" --replacement "~/";
}

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