Advertisement
cd62131

backup

Apr 8th, 2014
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. #!/bin/bash -e
  2. file='File'
  3. if [[ -e ${file}.3 ]]; then mv ${file}.3 ${file}.4; fi
  4. if [[ -e ${file}.2 ]]; then mv ${file}.2 ${file}.3; fi
  5. if [[ -e ${file}.1 ]]; then mv ${file}.1 ${file}.2; fi
  6. if [[ -e ${file} ]]; then mv ${file} ${file}.1; fi
  7. :>${file}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement