![자동으로 컬 명령을 실행하여 여러 URL을 다운로드합니다.](https://linux55.com/image/11586/%EC%9E%90%EB%8F%99%EC%9C%BC%EB%A1%9C%20%EC%BB%AC%20%EB%AA%85%EB%A0%B9%EC%9D%84%20%EC%8B%A4%ED%96%89%ED%95%98%EC%97%AC%20%EC%97%AC%EB%9F%AC%20URL%EC%9D%84%20%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C%ED%95%A9%EB%8B%88%EB%8B%A4..png)
curl
여러 URL에서 예제를 실행하는 방법 :
curl https://google.com/1
curl https://google.com/2
curl https://google.com/3
curl
60초마다 자동화 하고 싶습니다 .
답변1
다음 방법을 시도해 보세요.
1) MultiCurl.sh 파일을 생성합니다.
/usr/bin/curl "https://google.com/1"
/usr/bin/curl "https://google.com/2"
/usr/bin/curl "https://google.com/3"
2) chmod를 사용하여 실행 가능하게 만듭니다.
chmod +x MultiCurl.sh
3) Cron Job에 추가
*/60 * * * * $Scriptpath/MultiCurl.sh
답변2
wget
또는 플래그와 함께 명령을 사용할 수 있습니다 --input-file
. 모든 URL을 파일에 넣고 list.txt
다음을 실행하십시오 wget
.
~$ cat list.txt
https://google.com/1
https://google.com/2
https://google.com/3
~$ wget --input-file ./list.txt