为什么开始用反斜杠shell命令? [英] Why start a shell command with a backslash?

查看:162
本文介绍了为什么开始用反斜杠shell命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  \\卷曲-L https://get.rvm.io |庆典-s稳定

为什么开始的命令'\\'?
<一href=\"https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-$p$pcise-pangolin-with-rvm\">This在这里我看到了它网站


解决方案

 别名卷曲='卷曲 - 有些--default --options

如果你有卷曲为一个别名,你不想使用它,把一个反斜杠前禁用别名,直接运行二进制卷曲。

请注意,这仅适用于交互式shell。别名不生效的脚本中,这样便无须在那里。

\curl -L https://get.rvm.io | bash -s stable

Why is the command starting with '\' ? This is the site where I saw it

解决方案

alias curl='curl --some --default --options'

If you have an alias for curl and you don't want to use it, putting a backslash in front disables the alias and runs the curl binary directly.

Note that this only applies at an interactive shell. Aliases don't take effect in scripts so it would be unnecessary there.

这篇关于为什么开始用反斜杠shell命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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