You can write and run Scala scripts directly from IntelliJ IDEA. Here's a simple step-by-step guide on this:
You can also use shell-style comments in this file if you plan running this script directly from your OS command prompt.