Goal:
Run gnome-terminal -e "npm run start --prefix /home/cc/Desktop/Programming/Software/Elastic/elasticsearch-head"
Code:
HEAD="gnome-terminal -e \"npm run start --prefix /home/cc/Desktop/Programming/Software/Elastic/elasticsearch-head\""
${HEAD}
Error:
Failed to parse arguments: Argument to "--command/-e" is not a valid command: Text ended before matching quote was found for ". (The text was '"npm')
Additional info:
When I try to use
ES="gnome-terminal -e \"/home/cc/Desktop/Programming/Software/Elastic/pna/bin/elasticsearch\""
${ES}
then it works without problem. The difference is that [...]/bin/elasticsearch
is a shell script itself, while npm run start
is supposed to run the programm npm
with the arguments run start
. But with my non-existing knowledge of Bash I'm not able to solve this.
Thanks for any suggestions!