relpipe-data/examples/runnable-jars.sh
branchv_0
changeset 294 abbc9bcfbcc4
child 329 5bc2bb8b7946
equal deleted inserted replaced
293:b862d16a2e9f 294:abbc9bcfbcc4
       
     1 #!/bin/bash
       
     2 
       
     3 findFiles() {
       
     4 	find ~/.m2/ -iname '*.jar' -printf '%p\0';
       
     5 }
       
     6 
       
     7 fetchAttributes() {
       
     8 	relpipe-in-filesystem \
       
     9 		--parallel 4 \
       
    10 		--file path \
       
    11 		--streamlet jar_info;
       
    12 }
       
    13 
       
    14 filterRunable() {
       
    15 	relpipe-tr-awk --relation '.*' --where 'main_class';
       
    16 }
       
    17 
       
    18 shortenPath() {
       
    19 	relpipe-tr-sed '.*' 'path' "^$HOME/?" "~/";
       
    20 }
       
    21 
       
    22 findFiles | fetchAttributes | filterRunable | shortenPath | relpipe-out-tabular