缩短链接。如何卷曲它们?并执行 bash
Shortened links. How to curl them? and execute bash
在这个 link http://goo.gl/3WQR9M 中,我有一些示例 shell 脚本代码,我想知道如何使用它:
bash <(curl -s http://goo.gl/3WQR9M)
这而不是卷曲完整的 link:
(https://gist.githubusercontent.com/DiogoSaraiva/b3a1ee49a049a152cfaf/raw/a2e5329ed4f9dee964ee2fe0d25d5967b7714d76/upgrade.sh):
有了这个:
#!/bin/bash
echo -e "###> UPGRADE <###\n"
apt-get upgrade -y
sleep 3
echo -e "\n\n"
echo -e "###> DIST-UPGRADE <###\n"
apt-get dist-upgrade -y
sleep 3
echo -e "\n\n"
echo -e "###> AUTOREMOVE <###\n"
apt-get auto remove
只输出这个:
<HTML>
<HEAD>
<TITLE>Moved Permanently</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Permanently</H1>
The document has moved <A HREF="https://gist.githubusercontent.com/DiogoSaraiva/b3a1ee49a049a152cfaf/raw/a2e5329ed4f9dee964ee2fe0d25d5967b7714d76/upgrade.sh">here</A>.
</BODY>
</HTML>
是否有任何 --option 用于卷曲 https://gist.githubusercontent.com/DiogoSaraiva/b3a1ee49a049a152cfaf/raw/a2e5329ed4f9dee964ee2fe0d25d5967b7714d76/upgrade.sh 而不是 http://goo.gl/3WQR9M ,但使用小的(例如:curl http://goo.gl/3WQR9M)
我需要的是:
为某处上传我的脚本;完成
获取RAW的URL?文件;完成
在一个小命令中执行互联网上的 shell 脚本;如何?
使用 curl -L 选项跟随 Location headers。然后,您可以使用以下 shell 命令:
curl -sSL http://goo.gl/3WQR9 | sudo sh
在这个 link http://goo.gl/3WQR9M 中,我有一些示例 shell 脚本代码,我想知道如何使用它:
bash <(curl -s http://goo.gl/3WQR9M)
这而不是卷曲完整的 link:
(https://gist.githubusercontent.com/DiogoSaraiva/b3a1ee49a049a152cfaf/raw/a2e5329ed4f9dee964ee2fe0d25d5967b7714d76/upgrade.sh):
有了这个:
#!/bin/bash
echo -e "###> UPGRADE <###\n"
apt-get upgrade -y
sleep 3
echo -e "\n\n"
echo -e "###> DIST-UPGRADE <###\n"
apt-get dist-upgrade -y
sleep 3
echo -e "\n\n"
echo -e "###> AUTOREMOVE <###\n"
apt-get auto remove
只输出这个:
<HTML>
<HEAD>
<TITLE>Moved Permanently</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Permanently</H1>
The document has moved <A HREF="https://gist.githubusercontent.com/DiogoSaraiva/b3a1ee49a049a152cfaf/raw/a2e5329ed4f9dee964ee2fe0d25d5967b7714d76/upgrade.sh">here</A>.
</BODY>
</HTML>
是否有任何 --option 用于卷曲 https://gist.githubusercontent.com/DiogoSaraiva/b3a1ee49a049a152cfaf/raw/a2e5329ed4f9dee964ee2fe0d25d5967b7714d76/upgrade.sh 而不是 http://goo.gl/3WQR9M ,但使用小的(例如:curl http://goo.gl/3WQR9M)
我需要的是:
为某处上传我的脚本;完成
获取RAW的URL?文件;完成
在一个小命令中执行互联网上的 shell 脚本;如何?
使用 curl -L 选项跟随 Location headers。然后,您可以使用以下 shell 命令:
curl -sSL http://goo.gl/3WQR9 | sudo sh