diff options
Diffstat (limited to 'dive-into-wikipedia.sh')
-rwxr-xr-x | dive-into-wikipedia.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dive-into-wikipedia.sh b/dive-into-wikipedia.sh new file mode 100755 index 0000000..8088e95 --- /dev/null +++ b/dive-into-wikipedia.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ $# -eq 0 ]; then + "$0" 'https://de.wikipedia.org/wiki/Evolution' +elif [ $# -eq 1 ]; then + printf '%s\n' "$1" + curl -x 'socks5://127.0.0.1:9050' -s "$1" \ + | sed ' + s/>/>\n/g + s/</\n</g + ' \ + | sed ' + s,^<a \(.* \)\?href="/wiki/\([^":#]\+\)"[ >].*,https://de.wikipedia.org/wiki/\2, + t + d + ' \ + | grep -vxF '' +else + parallel -n1 -j0 "$0" +fi \ + | sort -u + |