Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.60 KB | None | 0 0
  1. #!/bin/bash
  2. # @author   : Scorfly
  3. # version   : 1.0
  4. # date      : 25/10/2010
  5.  
  6. c='1'
  7. r='1'
  8. p='1'
  9.  
  10. echo "INSERT INTO ah_emplacements (libre, continent, region, position) VALUES (TRUE, '$c', '$r', '$p');" > emplacements.sql
  11.    
  12. let "p=$p+1"
  13.    
  14. for numero in `seq 1 80919`
  15. do
  16.     if [ $r = "999" ] && [ $p = "10" ]
  17.     then
  18.         let "c=$c+1"
  19.         r='0'
  20.     fi
  21.     if [ $p = "10" ]
  22.     then
  23.         let "r=$r+1"
  24.         p='1'
  25.     fi
  26.     echo "INSERT INTO ah_emplacements (libre, continent, region, position) VALUES (TRUE, '$c', '$r', '$p');" >> emplacements.sql
  27.     let "p=$p+1"
  28. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement