\curl -L https://get.rvm.io | bash -s stable Why is the command starting with \? This is the site where I saw it.
\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.
shopt -s expand_aliases before use of the alias\curl doesn't bypass any shell function named curl. For that, you can use the bash built-in command command: command curl ...\curl ... is command curl ...dash (and possibly other shells, although you're correct for bash without expand_aliases) does expand aliases in scripts.The (Bourne/POSIX) shell specification says that alias substitution in an interactive shell is suppressed when any character of the command word is quoted. A backslash is one way to do that, but there are also other well known ways to quote: single and double quotes. All of the following will suppress alias substitution:
\curl cur\l \c\u\r\l "c"url "curl" "c""u""r""l" 'curl' 'cu'"rl" Using \curl is just the most common and readable way. Since this is a standardized feature, you can expect it to work in all Bourne-heritage shells.
\curl looks a bit like a TeX command, doesn't it? :-)
\curl bypasses an aliases of the same name; note that only aliases are bypassed this way, not shell functions; command curl ... would ensure bypassing either.command() { echo "Not command, lol!"; } ; command -V echo ; \command -V echo ; \command command echo "This is command! (masking despair)" prints Not command, lol! x 3.command itself with a shell function, you're defeating the mechanism. What your example shows is that \ doesn't bypass functions, as stated. A non-self-defeating example: date() { echo 'not date'; }; date; command date. If you're worried about malicious tampering with command, see stackoverflow.com/a/35931876/45375command to not be overridden. From your own link: Thus, with no control over the execution environment, you cannot write shell scripts that are fully immune to tampering, unless you know that your code will be executed by dash, ksh, or bash (with the workaround in place)