I'm trying to use pipe redirection in pre-build script
grep -r avr_kind_t $(PROJECT_DIR)simavr/cores/ | awk -F '[ :]' '{print $1 "=" $3;}'
and got error:
-------------- Build: Config in simavr (compiler: GNU GCC Compiler)---------------
Running target pre-build steps
grep -r avr_kind_t ...path.../simavr/cores/ | awk -F '[ :]' '{print "=" ;}'
Usage: awk [POSIX or GNU style options] -f progfile [--] file ...
....
Good, i added '$':
grep -r avr_kind_t $(PROJECT_DIR)simavr/cores/ | awk -F '[ :]' '{print $$1 "=" $$3;}'
And got:
-------------- Build: Config in simavr (compiler: GNU GCC Compiler)---------------
Running target pre-build steps
grep -r avr_kind_t ...path.../simavr/cores/ | awk -F '[ :]' '{print $1 "=" $3;}'
Usage: awk [POSIX or GNU style options] -f progfile [--] file ...
...
I selecting last command from output:
grep -r avr_kind_t ...path.../simavr/cores/ | awk -F '[ :]' '{print $1 "=" $3;}'
paste it to console and got result without error:
user@host ...path.../simavr/simavr $ grep -r avr_kind_t ...path.../simavr/cores/ | awk -F '[ :]' '{print $1 "=" $3;}'
...path.../simavr/cores/sim_mega48.c=mega48
....
What i'm doing wrong?
Thanks.