Guest User

grass gis rename columns through bash

a guest
Jan 14th, 2012
92
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. IN="oktobris;novembris;decembris;janvaris;februaris;marts;aprilis;maijs;junijs;julijs;augusts;septembri"
  2. arr=$(echo $IN | tr ";" "\n")
  3. #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  4.  
  5. #this is an example how the cycles in bash are made
  6. #for x in $arr
  7. #do
  8. #    echo "$x"
  9. #done
  10.  
  11. i=3
  12. for x in $arr
  13. do
  14.     v.db.renamecol map=perc83 column=dbl_$i,$x
  15.     echo "$x dbl_$i"
  16.     i=$(echo $i+1| bc ;exit)
  17. done
RAW Paste Data