Skip to content

Instantly share code, notes, and snippets.

@MisterDA
Created January 18, 2017 23:33
Show Gist options
  • Save MisterDA/ac6087b1adbcfe610442a87cc3f3db5b to your computer and use it in GitHub Desktop.
Save MisterDA/ac6087b1adbcfe610442a87cc3f3db5b to your computer and use it in GitHub Desktop.
Projet Ungoliant
#!/bin/bash
set -e
SITE_DIR=$(echo "$1" | sed -E 's|^(https?\|file)://([^/]*)/.*$|\2|')
mkdir -p "httrack"
cd "httrack"
httrack "$1" -O "httrack"
grep -r "$2" "httrack/${SITE_DIR}" --color=auto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment