다른 도메인에 파일이 있습니다. grep과 같은 명령을 사용하는 가장 좋은 방법은 무엇입니까?
wget http://path/to/file.txt | grep search
그러나 이것은 작동하지 않습니다. 나는 사용할 수 있다고 생각 curl
하지만 더 효율적인 방법이 있습니까?
를 사용 curl
하여이 작업을 수행 할 수도 있습니다 wget
.
$ curl -s <url> | grep <pattern>
$ curl -s http://textfiles.com/100/914bbs.txt | grep Colorama
965-7600 /Colorama / CoCo / 300/1200 /General BBS
스위치 세부 사항
-s, --silent
Silent or quiet mode. Don't show progress meter or error
messages. Makes Curl mute. It will still output the data you ask
for, potentially even to the terminal/stdout unless you redirect it.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다