diff --git a/c/Makefile b/c/Makefile index d3efce1da..bd4530823 100644 --- a/c/Makefile +++ b/c/Makefile @@ -19,7 +19,7 @@ FDSL_OBJS = ./dsls/filter_dsl_parse.o ./dsls/filter_dsl_lexer.o ./dsls/filter_ds top: tags mlr test -install: mlr +install: top cp mlr $(HOME)/bin/ mlr: .always tags dsls diff --git a/c/cli/mlrcli.c b/c/cli/mlrcli.c index 2e703bd9e..9b9b694c6 100644 --- a/c/cli/mlrcli.c +++ b/c/cli/mlrcli.c @@ -86,15 +86,15 @@ static void check_arg_count(char** argv, int argi, int argc, int n) { } static char sep_from_arg(char* arg, char* argv0) { - if (streq(arg, "TAB")) + if (streq(arg, "tab")) return '\t'; - if (streq(arg, "SPACE")) + if (streq(arg, "space")) return ' '; - if (streq(arg, "NEWLINE")) + if (streq(arg, "newline")) return '\n'; - if (streq(arg, "PIPE")) + if (streq(arg, "pipe")) return '|'; - if (streq(arg, "SEMICOLON")) + if (streq(arg, "semicolon")) return '|'; if (strlen(arg) != 1) main_usage(argv0); diff --git a/doc/content-for-reference.html b/doc/content-for-reference.html index b561d6819..d17d0819f 100644 --- a/doc/content-for-reference.html +++ b/doc/content-for-reference.html @@ -168,8 +168,9 @@ same as 2 4 5: --repifs --ifs ' ' lets this happen. In fact, the --ipprint option above is internally implemented in terms of --repifs. -
Just write out the desired separator, e.g. --ofs '|'. But you may use -the symbolic names NEWLINE, TAB, PIPE, or SEMICOLON if you like. + Just write out the desired separator, e.g. --ofs '|'. But you +may use the symbolic names newline, space, tab, +pipe, or semicolon if you like. diff --git a/doc/data/linreg-example.txt b/doc/data/linreg-example.txt index 2bebfa1e3..81865a3bb 100644 --- a/doc/data/linreg-example.txt +++ b/doc/data/linreg-example.txt @@ -1,12 +1,12 @@ mlr filter '($x<.5 && $y<.5) || ($x>.5 && $y>.5)' data/medium > data/medium-squares -mlr --ofs NEWLINE stats2 -a linreg -f x,y data/medium-squares +mlr --ofs newline stats2 -a linreg -f x,y data/medium-squares x_y_m=0.764675 x_y_b=0.124841 # Set x_y_m and x_y_b as shell variables -eval $(mlr --ofs NEWLINE stats2 -a linreg -f x,y data/medium-squares) +eval $(mlr --ofs newline stats2 -a linreg -f x,y data/medium-squares) # In addition to x and y, make a new yfit which is the line fit. Plot using your favorite tool. mlr --onidx put '$yfit='$x_y_m'*$x+'$x_y_b then cut -x -f a,b,i data/medium-squares \ diff --git a/doc/reference.html b/doc/reference.html index 5797f66e1..c3fc1d724 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -338,8 +338,9 @@ same as 2 4 5: --repifs --ifs ' ' lets this happen. In fact, the --ipprint option above is internally implemented in terms of --repifs. - Just write out the desired separator, e.g. --ofs '|'. But you may use -the symbolic names NEWLINE, TAB, PIPE, or SEMICOLON if you like. + Just write out the desired separator, e.g. --ofs '|'. But you +may use the symbolic names newline, space, tab, +pipe, or semicolon if you like. @@ -1175,12 +1176,12 @@ distributed on the unit interval. Here we remove half the data and fit a line to mlr filter '($x<.5 && $y<.5) || ($x>.5 && $y>.5)' data/medium > data/medium-squares -mlr --ofs NEWLINE stats2 -a linreg -f x,y data/medium-squares +mlr --ofs newline stats2 -a linreg -f x,y data/medium-squares x_y_m=0.764675 x_y_b=0.124841 # Set x_y_m and x_y_b as shell variables -eval $(mlr --ofs NEWLINE stats2 -a linreg -f x,y data/medium-squares) +eval $(mlr --ofs newline stats2 -a linreg -f x,y data/medium-squares) # In addition to x and y, make a new yfit which is the line fit. Plot using your favorite tool. mlr --onidx put '$yfit='$x_y_m'*$x+'$x_y_b then cut -x -f a,b,i data/medium-squares \