Digital Marketing

Read from STDIN in Groovy

print "What is your name? "
def name = System.in.newReader().readLine()
println "Your name is " + name
Exmaple:
$ groovy hello.goovy

What is your name? Goyun
Your name is Goyun

Comments

Popular posts from this blog

Fixed WSL sshd: no hostkeys available -- exiting

PowerMTA pmta command

How to fix: mv: failed to preserve ownership