使用shell脚本运行scala
#!/bin/sh
exec scala "$0" "$@"
!#
object HelloWorld extends App{
println("Hello, world!")
println(args.toBuffer)
}
HelloWorld.main(args)
运行结果
[root@hadoop01 ~]# sh script.sh 测试
Hello, world!
ArrayBuffer(测试)
使用shell脚本运行scala
#!/bin/sh
exec scala "$0" "$@"
!#
object HelloWorld extends App{
println("Hello, world!")
println(args.toBuffer)
}
HelloWorld.main(args)
运行结果
[root@hadoop01 ~]# sh script.sh 测试
Hello, world!
ArrayBuffer(测试)