I want to run something like this in my shell script:
./node_modules/.bin/npm-run-all -p "ng lint myapp"
I have a for loop to generate the quoted string:
LINT=""
for app in $APPS
do
LINT="$LINT \"ng lint ${app}\""
done
I thought using \" will be able to generate the string I want. But when I run:
./node_modules/.bin/npm-run-all -p ${LINT}
I get:
ERROR: Task not found: ""ng", myapp""
Seems like this is being run:
./node_modules/.bin/npm-run-all -p \"ng lint myapp\"
What is the proper way to escape the double quote so that I will be running this instead?:
./node_modules/.bin/npm-run-all -p "ng lint myapp"