From 086060d7f4f60752e4d56d42b36c4f02a9b44650 Mon Sep 17 00:00:00 2001 From: counter2015 Date: Fri, 10 Apr 2020 22:43:54 +0800 Subject: [PATCH] Update your-first-lines-of-scala.md See #1133 , Remove `HelloWorld.main(args)` and change script header. --- documentation/your-first-lines-of-scala.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/documentation/your-first-lines-of-scala.md b/documentation/your-first-lines-of-scala.md index bb0628304..d6bfab965 100644 --- a/documentation/your-first-lines-of-scala.md +++ b/documentation/your-first-lines-of-scala.md @@ -87,12 +87,13 @@ We may also run our example as a shell script or batch command (see the examples The [bash](http://www.gnu.org/software/bash/) shell script `script.sh` containing the following Scala code (and shell preamble): - #!/usr/bin/env scala + #!/bin/sh + exec scala "$0" "$@" + !# object HelloWorld extends App { println("Hello, world!") } - HelloWorld.main(args) can be run directly from the command shell: