Converting shell scripts to scala, how to do it?

yes something like that. I was wondering whether I could use a module for this.
I don’t know how to use modules. BTW I posted another question to this forum to
try to understand modules.