Advertisement
ajthemacboy

perl

May 9th, 2015
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. (Double the second value) perl -i'.bak' -pe 's/(?<=Height\()([0-9.]+)F(.+?)([0-9.]+)F(?=\);)/sprintf "%sF%s%sF",1*$1,$2,2*$3/e' bop.txt
  2.  
  3. Final 1: perl -i'.bak' -pe 's/(?<=Height\()([0-9.]+)F(.+?)([0-9.]+)F(?=\);)/sprintf "%sF%s%sF",1.2*$1,$2,20*$3/e' bop.txt
  4.  
  5. Final 2: perl -i'.bak' -pe 's/(?<=Height\()([0-9.]+)F(.+?)([0-9.]+)F(?=\);)/sprintf "%sF%s%sF",1.1*$1,$2,5*$3/e'
  6.  
  7. perl -i'.bak' -pe 's/(?<=Height\()([0-9.]+)F(.+?)([0-9.]+)F(?=\);)/sprintf "%sF%s%sF",$1,$2,2*$3' bop.txt
  8.  
  9. awk -F'[(,)]' '$1~/[ ]*private static final Height biomeHeight = new Height/\
  10. {$0=$1"("$2*1"F, "$3*2"F);";}1'
  11.  
  12. perl -i'.bak' -pe 's/(?<=Height\()([0-9.]+)F(.+?)([0-9.]+)F(?=\);)/sprintf "%sF%s%sF",1.3*$1,$2,6*$3/e'
  13.  
  14. BOPSmooth1: perl -i'.bak' -pe 's/(?<=Height\()([0-9.]+)F(.+?)([0-9.]+)F(?=\);)/sprintf "%sF%s%sF",2.0*$1,$2,0.1*$3/e' bop.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement