Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # Check http://www1.s2.starcat.ne.jp/ndxc/ for new scheds
  4.  
  5. SCHEDS=http://www1.m2.mediacat.ne.jp/binews/us/userlist1.txt
  6.  
  7. if [ -f eibi.txt ] ; then
  8. echo -n Backing up scheds...
  9. mv userlist1.txt userlist1.txt.old
  10. echo done.
  11. echo -n Downloading new scheds...
  12. wget -q $SCHEDS
  13. echo done.
  14. if [ ! -f userlist1.txt ] ; then
  15. echo -n No update, reverting...
  16. mv userlist1.txt.old userlist1.txt
  17. echo done.
  18. else
  19. echo -n Removing crap...
  20. cat userlist1.txt | sed 's,*,,' > userlist2.txt
  21. mv userlist2.txt userlist1.txt
  22. echo done.
  23. echo -n Removing headers...
  24. tail -n +5 userlist1.txt > userlist2.txt
  25. mv userlist2.txt userlist1.txt
  26. echo done.
  27. fi
  28. else
  29. echo -n Downloading new scheds...
  30. wget -q $SCHEDS
  31. echo done.
  32. echo -n Removing crap...
  33. cat userlist1.txt | sed 's,*,,' > userlist2.txt
  34. mv userlist2.txt userlist1.txt
  35. echo done.
  36. echo -n Removing headers...
  37. tail -n +5 userlist1.txt > userlist2.txt
  38. mv userlist2.txt userlist1.txt
  39. echo done.
  40.  
  41. fi
  42. touch userlist1.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement