使用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(测试)
2022-04-16 02:32:01
使用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(测试)
下一篇:linux入门总结