[[: Team not found

I install RVM on a system where I do not have sudo permissions. It should work fine in theory, but when I added

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

in bash_profile, it does not do what it should, and it gives me this error

[[: Command not found.

Does anyone know what the problem is?

+3
source share
4 answers

"[[" .. "]]" is a built-in bash. Is there another shell running the script?

+3
source

At the top of the script:

enter the following:

#!/bin/bash

This will lead to what bashbecomes an interpretative shell. As mentioned in other answers, [[ ]]is the syntax of bashism, not POSIX.

+3
source

, .bash_profile , bash.

+2

RVM csh, bash zsh >= 4.3.5.

(see http://rvm.io/rvm/prerequisites/ )

+1
source

Source: https://habr.com/ru/post/1788557/


All Articles