Projet

Général

Profil

Flux rss script » geturl.sh

script récupérant les url de manière ordonné - Grégoire DORIN, 06/03/2023 14:39

 
#!/bin/bash

echo "" > linkfile.txt
echo "" > sparseline.txt
echo "" > sortlink.txt

wget -qO- https://www.arkhane-asylum.fr/en/ | grep -A 257 "<div id=\"news\"" >> linkfile.txt

while read line
do
grep -oP '(?)https://.*?(?=")' <<< "$line" >> sparseline.txt
done < linkfile.txt

grep "/en/20" sparseline.txt >> sparseline.tmp
mv sparseline.tmp sparseline.txt

# tail -n +2 sparseline.txt > sparseline.tmp && mv sparseline.tmp sparseline.txt

sort sparseline.txt | uniq >> sortlink.txt
tail -n +2 sortlink.txt > sortlink.tmp && mv sortlink.tmp sortlink.txt


(1-1/6)