This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: fetch_urls.sh "URL" | |
# Example: fetch_urls.sh "https://example.com/" | tee urls.txt | |
# https://example.com/ に再帰的にアクセスして、 urls.txt にURL一覧を書き出す | |
# Requirements: wget perl | |
# wget が入ってない場合、 brew install wget などでインストールして下さい。 | |
_url="$1" | |
( | |
wget -nd -nH --spider --recursive --level=inf --no-verbose --execute robots=off "$_url" 2>&1 |