0
다음 명령에서 "$"기호는 무엇을 의미합니까? ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
누군가가 다음 homebrew install 명령을 설명 할 수 있습니까?
다음 명령에서 "$"기호는 무엇을 의미합니까? ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
누군가가 다음 homebrew install 명령을 설명 할 수 있습니까?
이것은 셸 기능인 command substitution입니다. $(command)
은 명령 출력으로 대체된다
$ echo puts 1 + 2
puts 1 + 2
$ ruby -e "$(echo puts 1 + 2)"
3
번째 라인 ruby -e "puts 1 + 2"
동일하다.
예에서 curl
명령은 Ruby file 및 ruby -e
을 다운로드하여 출력합니다.
루비에서 해당 링크로 작성된 코드를 다운로드하여 실행하십시오. – aelor
ruby가 curl 명령의 출력을 평가합니다 –