This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 14.11, “How to access command-line arguments in a Scala shell script.”
You want to access the command-line arguments from your Scala shell script.
Use the same script syntax as shown in Recipe 14.8, “Generating Documentation with
scaladoc”, and then access the command-line arguments using
args, which is a List[String]` that is implicitly made available: