From 7bb40e2c2b767038ea1fc18de01655c6d101de7f Mon Sep 17 00:00:00 2001 From: John Kerl Date: Fri, 18 Sep 2020 14:44:13 -0400 Subject: [PATCH] make ./build work without . in $PATH --- go/build | 4 ++-- go/u/try-chain | 2 +- go/u/try-cst | 22 +++++++++++----------- go/u/try-help | 2 +- go/u/try-help.out | 32 ++++++++++++++++---------------- go/u/try-io | 2 +- go/u/try-parse | 2 +- go/u/try-perf | 6 +++--- go/u/try-verbs | 2 +- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/go/build b/go/build index 2d9461564..a0d42411c 100755 --- a/go/build +++ b/go/build @@ -9,5 +9,5 @@ fi set -euo pipefail ./build-go -tester -check $verbose +./tester +./check $verbose diff --git a/go/u/try-chain b/go/u/try-chain index 2e88406b0..270d6c7a9 100755 --- a/go/u/try-chain +++ b/go/u/try-chain @@ -4,7 +4,7 @@ run_mlr() { echo echo ---------------------------------------------------------------- echo mlr "$@" - mlr "$@" + ./mlr "$@" } echo ================================================================ diff --git a/go/u/try-cst b/go/u/try-cst index a4dd9f758..8039ea08f 100755 --- a/go/u/try-cst +++ b/go/u/try-cst @@ -7,7 +7,7 @@ run_mlr() { echo echo ---------------------------------------------------------------- echo mlr "$@" - mlr "$@" + ./mlr "$@" } echo; run_mlr --from u/s.dkvp --idkvp --opprint put '' @@ -127,18 +127,18 @@ echo '{"x":{},"y":1}' | run_mlr --json cat echo '{"x":{"a":1,"b":2,"c":3},"y":4}' | run_mlr --json cat echo '{"x":{"a":1,"b":{"c":3,"d":4,"e":5},"f":6},"y":7}' | run_mlr --json cat -echo '{"x":1}' | mlr --json cat | mlr --json cat -echo '{"x":[1,2,3]}' | mlr --json cat | mlr --json cat -echo '{"x":[1,[2,3,4],5]}' | mlr --json cat | mlr --json cat -echo '{"x":[1,[2,[3,4,5],6],7]}' | mlr --json cat | mlr --json cat +echo '{"x":1}' | ./mlr --json cat | ./mlr --json cat +echo '{"x":[1,2,3]}' | ./mlr --json cat | ./mlr --json cat +echo '{"x":[1,[2,3,4],5]}' | ./mlr --json cat | ./mlr --json cat +echo '{"x":[1,[2,[3,4,5],6],7]}' | ./mlr --json cat | ./mlr --json cat -echo '{"x":{}}' | mlr --json cat | mlr --json cat -echo '{"x":{"a":1,"b":2,"c":3}}' | mlr --json cat | mlr --json cat -echo '{"x":{"a":1,"b":{"c":3,"d":4,"e":5},"f":6}}' | mlr --json cat | mlr --json cat +echo '{"x":{}}' | ./mlr --json cat | ./mlr --json cat +echo '{"x":{"a":1,"b":2,"c":3}}' | ./mlr --json cat | ./mlr --json cat +echo '{"x":{"a":1,"b":{"c":3,"d":4,"e":5},"f":6}}' | ./mlr --json cat | ./mlr --json cat -echo '{"x":{},"y":1}' | mlr --json cat | mlr --json cat -echo '{"x":{"a":1,"b":2,"c":3},"y":4}' | mlr --json cat | mlr --json cat -echo '{"x":{"a":1,"b":{"c":3,"d":4,"e":5},"f":6},"y":7}' | mlr --json cat | mlr --json cat +echo '{"x":{},"y":1}' | ./mlr --json cat | ./mlr --json cat +echo '{"x":{"a":1,"b":2,"c":3},"y":4}' | ./mlr --json cat | ./mlr --json cat +echo '{"x":{"a":1,"b":{"c":3,"d":4,"e":5},"f":6},"y":7}' | ./mlr --json cat | ./mlr --json cat echo; run_mlr --from u/s.dkvp --idkvp --ojson put '$z = $*["a"]' echo; run_mlr --from u/s.dkvp --idkvp --ojson put '$z = $*' diff --git a/go/u/try-help b/go/u/try-help index f216cdbe3..e5e8640a6 100755 --- a/go/u/try-help +++ b/go/u/try-help @@ -2,4 +2,4 @@ set -euo pipefail -mlr --help-all-verbs +./mlr --help-all-verbs diff --git a/go/u/try-help.out b/go/u/try-help.out index aac69822e..706c3ae35 100644 --- a/go/u/try-help.out +++ b/go/u/try-help.out @@ -1,11 +1,11 @@ ================================================================ -Usage: mlr cat [options] +Usage: ./mlr cat [options] Passes input records directly to output. Most useful for format conversion. -N (default ) Prepend field {name} to each record with record-counter starting at 1 -n (default false) Prepend field "n" to each record with record-counter starting at 1 ================================================================ -Usage: mlr cut [options] +Usage: ./mlr cut [options] Passes through input records with specified fields included/excluded. -complement (default false) Synonymous with -x -f (default ) Comma-separated field names for cut, e.g. a,b,c @@ -14,37 +14,37 @@ Default is to retain them in the order found in the input data. -x (default false) Exclude, rather than include, field names specified by -f. Examples: - mlr cut -f hostname,status - mlr cut -x -f hostname,status + ./mlr cut -f hostname,status + ./mlr cut -x -f hostname,status ================================================================ -Usage: mlr group-by [options] +Usage: ./mlr group-by [options] Outputs records in batches having identical values at specified field names. ================================================================ -Usage: mlr group-like [options] +Usage: ./mlr group-like [options] Outputs records in batches having identical field names. ================================================================ -Usage: mlr head [options] +Usage: ./mlr head [options] Passes through the first n records, optionally by category. -g (default ) Optional group-by-field names for head counts, e.g. a,b,c -n (default 10) Head count to print ================================================================ -Usage: mlr label [options] {new1,new2,new3,...} +Usage: ./mlr label [options] {new1,new2,new3,...} Given n comma-separated names, renames the first n fields of each record to have the respective name. (Fields past the nth are left with their original names.) Particularly useful with --inidx or --implicit-csv-header, to give useful names to otherwise integer-indexed fields. ================================================================ -Usage: mlr nothing +Usage: ./mlr nothing Drops all input records. Useful for testing, or after tee/print/etc. have produced other output. ================================================================ -Usage: mlr put [options] {DSL expression} +Usage: ./mlr put [options] {DSL expression} TODO: put detailed on-line help here. -f (default ) File containing a DSL expression. -q (default false) Does not include the modified record in the output stream. @@ -54,11 +54,11 @@ TODO: put detailed on-line help here. Miller's grammar, to stdout. ================================================================ -Usage: mlr rename [options] {old1,new1,old2,new2,...} +Usage: ./mlr rename [options] {old1,new1,old2,new2,...} Renames specified fields. ================================================================ -Usage: mlr sort {flags} +Usage: ./mlr sort {flags} Sorts records primarily by the first specified field, secondarily by the second field, and so on. (Any records not having all specified sort keys will appear at the end of the output, in the order they were encountered, regardless of the @@ -73,16 +73,16 @@ Flags: -nr {comma-separated field names} Numerical descending; nulls sort first Example: - mlr sort -f a,b -nr x,y,z + ./mlr sort -f a,b -nr x,y,z which is the same as: - mlr sort -f a -f b -nr x -nr y -nr z + ./mlr sort -f a -f b -nr x -nr y -nr z ================================================================ -Usage: mlr tac +Usage: ./mlr tac Prints records in reverse order from the order in which they were encountered. ================================================================ -Usage: mlr tail [options] +Usage: ./mlr tail [options] Passes through the last n records, optionally by category. -g (default ) Optional group-by-field names for tail counts, e.g. a,b,c -n (default 10) Tail count to print diff --git a/go/u/try-io b/go/u/try-io index 8435029b8..6a7cdcc87 100755 --- a/go/u/try-io +++ b/go/u/try-io @@ -7,7 +7,7 @@ run_mlr() { echo echo ---------------------------------------------------------------- echo mlr "$@" - mlr "$@" + ./mlr "$@" } ofmt=pprint diff --git a/go/u/try-parse b/go/u/try-parse index 38f9edc94..33f897d68 100755 --- a/go/u/try-parse +++ b/go/u/try-parse @@ -7,7 +7,7 @@ run_mlr() { echo echo ---------------------------------------------------------------- echo mlr "$@" - mlr "$@" + ./mlr "$@" } # With mlr -n put v, we are only parsing the DSL expression into an AST and diff --git a/go/u/try-perf b/go/u/try-perf index a8f2337aa..5c96dea65 100755 --- a/go/u/try-perf +++ b/go/u/try-perf @@ -2,11 +2,11 @@ n=10 -repeat $n justtime mlr cat ../data/nmc1.dkvp > /dev/null +repeat $n justtime ./mlr cat ../data/nmc1.dkvp > /dev/null echo -repeat $n justtime mlr --csv cat ../data/nmc1.csv > /dev/null +repeat $n justtime ./mlr --csv cat ../data/nmc1.csv > /dev/null echo -repeat $n justtime mlr --csv cut -x -f ccode,version ../data/nmc1.csv > /dev/null +repeat $n justtime ./mlr --csv cut -x -f ccode,version ../data/nmc1.csv > /dev/null echo echo repeat $n justtime ../c/mlr cat ../data/nmc1.dkvp > /dev/null diff --git a/go/u/try-verbs b/go/u/try-verbs index 9254b61d4..33583b873 100755 --- a/go/u/try-verbs +++ b/go/u/try-verbs @@ -7,7 +7,7 @@ run_mlr() { echo echo ---------------------------------------------------------------- echo mlr "$@" - mlr "$@" + ./mlr "$@" } run_mlr --opprint cut -f x,a u/s.dkvp