Skip to content

Instantly share code, notes, and snippets.

@fjtawork
fjtawork / fetch_urls.sh
Created January 24, 2021 00:41 — forked from ecoopnet/fetch_urls.sh
指定したURLから再帰的にURLを取ってくるスクリプト
#!/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