Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

cata.sh

By: a guest on Feb 19th, 2013  |  syntax: Bash  |  size: 0.32 KB  |  hits: 319  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. set charToPreserve=$1
  4. mkdir backups
  5. ./cataclysm &
  6. while [ -n "$(pgrep cataclysm)" ]
  7. do
  8.         set date=$(date +%Y%m%d":"%H:%M)
  9.         mkdir backups/$date
  10.         cp ./save/$charToPreserve.* backups/$date
  11.         sleep 3600
  12. done
  13.  
  14. set date=$(date +%Y%m%d":"%H:%M)
  15. mkdir backups/$date
  16. cp ./save/$charToPreserve.* backups/$dat