I want to use the following string and put it into childprocess
make -qp | awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split($1,A,/ /);for(i in A)print A[i]}' | sort -u
I was able to run it on the terminal succesfully however when I put it for child process I got error:
I try like this
let commandLine = "make -qp | awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split($1,A,/ /);for(i in A)print A[i]}' | sort -u";
try {
let { stdout, stderr } = await exec(commandLine, { cwd: workspaceRoot });
any idea ?
error :
awk: nonterminated character class ^[a-zA-Z0-9][^$#
source line number 1
context is
>>> /^[a-zA-Z0-9][^$#/ <<<
this is the idea... How do you get the list of targets in a makefile?