What I want to achieve is to automatically install NPM packages, so I created a separate variable which holds "sudo npm install"
and iterating over an array which has the package name.
Facing error that command not found but if I put it into the console it works.
npm_base='sudo npm install '
npm_scripts=("-g eslint")
for element in ${npm_scripts[@]}
do
${npm_base}${element}
done