Ubuntu Pastebin

Paste from tolga at Fri, 14 Jul 2017 06:42:19 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#!/bin/bash
Y=$(date +%Y)
M=$(date +%B)
D=$(date +%d)
m=$(date +%m)
TODAY=$Y-$B-$D
TDY=$Y-$m-$D
BL=$HOME/kirik-baglantilar
CKD=$BL/$Y/$M/checked
lc=$(which linkchecker)
if [ $# -eq 1 ];
  then $lc "http://$1.sabanciuniv.edu" > "$BL/$Y/$M/${1##*/}.sabanciuniv.edu-$TDY.txt"
elif [ $# -eq 0 ];
  then while read -r url file;do echo "Processing $url" && $lc "$url" > "$BL/$Y/$M/$file-$(date +%Y-%m-%d).txt";done < $HOME/sabanci-url.txt
fi
Download as text