cling icon indicating copy to clipboard operation
cling copied to clipboard

Command line parameters in scripts

Open BrainStone opened this issue 4 years ago • 2 comments

Hello. I'd love to know how I can handle command line parameters in a script file.

Like let's say I have the script file test.cpp (starts with #!/path/to/cling) and I call it like ./test.cpp foobar, how can I access the parameter foobar?

Essentially what are the equivalents to $1, $2, etc. or int argc, char* argv[]

BrainStone avatar Feb 12 '20 16:02 BrainStone

I don't think we have that - but it's a great idea! PRs welcome! :-)

Axel-Naumann avatar Jun 10 '20 05:06 Axel-Naumann

Giving this a gentle bump as I believe this would be a great feature!

BrainStone avatar Jul 21 '20 19:07 BrainStone