
1 9hills 2013-09-14 21:00:01 +08:00 表述不清,「不能执行」是什么? 最次也得把终端内容复制or截图上来吧。。。 |
2 pluto OP 问题似乎不在curl上,如果直接 cat /tmp/test.sh|bash Ok, u r root.Let's going on. Check linux distro version... Pls mannual enter eth info: ct ip addr : cnc ip addr : ct eth alias : cnc eth alias : ct route : cnc route : Pls verify the ethernet info and input [yes/no] then enter. 就是脚本里有 read 变量的地方,通过管道就自动忽略然后结束了,问题变成管道后无法 read 变量了。 |
3 pluto OP 知道了,与父子shell有关系,read无法获取变量。 |
4 LazyZhu 2013-09-14 23:08:01 +08:00 curl -s https://npmjs.org/install.sh > npm-install-$$.sh | sudo sh |
5 pluto OP 不过我这种情况是子shell无法让父shell给read的变量赋值。。。 |