Playframework 2.0 is right around the corner, and it’s core is programmed in Scala, so it’s a wonderful opportunity to give this object-oriented / functional hybrid beast a try…
Like many others, I will pick a very simple script to give my first steps…
I still prefer a simple shell script for these use cases. Here's a snippet for the translated file size calculation:<p><pre><code> translated_files=$(grep "todavida no ha sido traducida" *)
total_size=$(du --summarize . | cut -f 1)
translated_file_size=$(du --summarize --total $(echo translated_files) | tail -n 1 | cut -f 1)
echo "translated size: ${translated_file_size}KB/${total_size}KB $(($translated_file_size/$total_size))%"</code></pre>
A nice article, but its worth mentioning that scala for bash script usage is a non-starter for most stuff you might use bash for because JVM startup overhead, even for the client VM, is so substantial
Thanks to everybody's feedback on this one... You encouraged me to write another article, mainly because I felt a little guilty for bashing (pun intented) bash and python ;-)
Hope you like it <a href="http://playlatam.wordpress.com/2012/01/13/first-steps-with-scala-revisited-bash-and-python-strikes-back/" rel="nofollow">http://playlatam.wordpress.com/2012/01/13/first-steps-with-s...</a>