![추가 매개변수를 사용하여 실행 파일로 파이프](https://linux55.com/image/181125/%EC%B6%94%EA%B0%80%20%EB%A7%A4%EA%B0%9C%EB%B3%80%EC%88%98%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20%EC%8B%A4%ED%96%89%20%ED%8C%8C%EC%9D%BC%EB%A1%9C%20%ED%8C%8C%EC%9D%B4%ED%94%84.png)
파이프를 사용하는 이와 같은 명령이 있습니다
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
반면에 get-poetry.py
다음과 같이 스크립트에 추가 매개변수를 제공 하고 싶습니다.
python get-poetry.py --version 0.7.0
배관을 올바르게 하려면 어떻게 해야 하며 가능합니까?
xargs
현재 이와 같은 명령을 사용하려고 하는데 운이 없습니다.
curl -sSL get-poetry.py | xargs -I {} python "{}" --version 0.7.0
답변1
알겠습니다. 필요에 따라 작동하는 것 같습니다.
$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python /dev/stdin --version 0.7.0
어쨌든 다른 적합한 작업 솔루션이 있다면 해당 접근 방식도 보고 싶습니다.