单行:
for i in `seq 1 100`; do PACKAGE_NAME=`gulp --task 2>&1 | grep 'Error: Cannot find module' | awk '{print $5}' | sed "s/'//g" | awk -F / '{print $1}'`; echo "install package: ${PACKAGE_NAME}"; cnpm install ${PACKAGE_NAME}; done
多行:
for i in `seq 1 100`
do
PACKAGE_NAME=`gulp --task 2>&1 | grep 'Error: Cannot find module' | awk '{print $5}' | sed "s/'//g" | awk -F / '{print $1}'`
echo "install package: ${PACKAGE_NAME}"
cnpm install ${PACKAGE_NAME}
done