如何使用卷曲在shell脚本? [英] How to use curl in a shell script?

查看:142
本文介绍了如何使用卷曲在shell脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想,才能在一个Ubuntu框安装RVM运行此shell脚本

I'm trying to run this shell script in order to install RVM in an Ubuntu box

#!/bin/bash
RVMHTTP="https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer"
CURLARGS="-f -s -S -k"

bash < <(curl $CURLARGS $RVMHTTP)

但我得到了以下错误

but I get the following error

语法错误:重定向意外

也测试不使用变量,但同样的结果,你能告诉我缺少的是什么?

Also tested not using the variables, but same result, could you tell what I'm missing?

推荐答案

首先,你的例子是寻找非常正确和行之有效我的机器上。你可以走另一条路。

Firstly, your example is looking quite correct and works well on my machine. You may go another way.

curl $CURLARGS $RVMHTTP > ./install.sh

所有的输出现在存储 ./ install.sh 文件,您可以编辑和执行。

All output now storing in ./install.sh file, which you can edit and execute.

这篇关于如何使用卷曲在shell脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆