Advertisement
Guest User

plan

a guest
Mar 24th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. our_plan=false
  4.  
  5. curl "https://www.wsiz.wroc.pl/plany-zajec/" > source.txt
  6. while read line;
  7.     do
  8.         if [ "$line" == "<p>Studia I stopnia niestacjonarne</p>" ]; then
  9.             our_plan=true
  10.         elif [[ "$line" == *"href="* ]] && [ $our_plan == true ]; then
  11.             echo $line | cut -d '"' -f 4 > kurwa.txt
  12.             rm plan-niestacjonarny-*
  13.             while read line; do
  14.                 wget -P ~/Desktop $line
  15.             done < kurwa.txt
  16.             rm kurwa.txt
  17.             break
  18.         fi;
  19.     done < source.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement