question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scripting: access to command line arguments

See original GitHub issue

the docs say that a hello world script is desugared to:

object hello {
  val message = "Hello from Scala script"
  println(message)

  def main(args: Array[String]): Unit = ()
}

this leaves me unable to reference args

I don’t see any information about this on the doc page I linked above

(context: I was hoping I could replace the combination of https://github.com/scala/community-build/blob/2.13.x/advance and https://github.com/scala/community-build/blob/2.13.x/scripts/Advance.scala with a single .sc file, but this is blocking me)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
tpasternakcommented, Oct 21, 2021

Thank you @SethTisue , you’re right, I’m reopening the issue

0reactions
tpasternakcommented, Dec 8, 2021

Thank you @SethTisue !

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Use Command Line Arguments in a Bash Script
Learn how to use command-line arguments inside the bash script.
Read more >
How to Read Command Line Arguments in Shell Scripts?
In today's article, we'll learn to read command-line arguments in shell scripts. Shell scripts are an essential tool for any Linux user.
Read more >
Adding arguments and options to your Bash scripts - Red Hat
Bash uses a tool called positional parameters to provide a means of entering data into a Bash program when it is invoked from...
Read more >
Bash Script - How to use Command Line Arguments
In this article, let us see about Command Line Arguments usage in Bash script. Arguments are inputs that are necessary to process the...
Read more >
How can I pass a command line argument into a shell script?
The shell command and any arguments to that command appear as numbered shell variables: $0 has the string value of the command itself, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found