Guest User

Untitled

a guest
Feb 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #!/bin/bash
  2. #Fix timestamps
  3.  
  4. INPUT=$1
  5. total=`cat $INPUT|wc -l`
  6. lines=0
  7. while read line
  8. do
  9. #echo "$line"
  10. USERNUM=`echo "$line"|awk '{print $1}'`
  11. VIDNUM=`echo "$line"|awk '{print $2}'`
  12. thumb_url=`cat videos/$USERNUM/*$VIDNUM""*html|grep thumb|grep Variable|tr ")" " "|awk '{print $2}'|tr -d "\""`
  13. last_header=`curl -s -I $thumb_url|grep Las`
  14. date="`echo ${last_header#* }`"
  15. #echo $last_header
  16. touch -d "$date" videos/$USERNUM/*$VIDNUM"".flv
  17. lines=$((lines+1))
  18. #rem=`echo "$total-$lines"|bc`
  19. echo "Touched videos/$USERNUM/*$VIDNUM.flv with $date"
  20. echo $total-$lines|bc
  21. #echo "$rem remaining"
  22. done<$INPUT
Add Comment
Please, Sign In to add comment