当使用角7 CLI并尝试创建一个新的角应用程序时,我和我得到以下错误:
/bin/sh: cnpm:未找到命令
2018-11-04 13:27:17 ⌚ COMPUTER_X in ~/TEK/learn
○ → ng new firebase-auth
? Would you like to add Angular routing? No
? Which stylesheet format would you like to use? CSS
CREATE firebase-auth/README.md (1029 bytes)
....
CREATE firebase-auth
在我的服务器(CentOS 7.2)中,我安装了依赖项:
npm install
但我会说出错误:
npm ERR! code Z_BUF_ERROR
npm ERR! errno -5
npm ERR! unexpected end of file
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-02-11T21_03_20_261Z-debug.log
在/root/.npm/_logs/2018-02-11T21_03_20_261Z-debug.log中,
setjdk()
{
if ["$1" == "a"]
then echo "A"
elif ["$1" == "b"];
then echo "B"
else
echo "Cow"
fi
}
上述bash函数的目的是根据第一个给定的参数值输出不同的结果。但是,当它不能像预期的那样工作的时候。当我输入"setjdk“时,我得到了以下结果:
-bash:[a:
因此,我正在编写一个程序,使用dd命令测试硬盘的平均读写速度,我的代码如下(Bash):
a=1
b=1
numval=3
for i in `seq 1 3`;
do
TEST$i=$(dd if=/dev/zero of=speedtest bs=1M count=100 conv=fdatasync)
#I think that this is the problem line
done
RESULT=$(($TEST1 + $TEST2))
RESULT=$(($RESULT + $TEST3))
RESULT=$(($RESULT / $numval)