I often find myself using the fantastic root -l -b -q -e 'std::cout << "Hello World!" << std::endl;' to quickly try things out or when debugging to quickly narrow down an issue.
However, I find it cumbersome to have to write the -l -b -q -e part repeatedly when semantically I want to perform a single action (“Just print the result of the expression!”) as opposed to the 4 actions the required options suggest (“Print the result of the expression, but don’t use graphics, don’t show the splash screen, and please quit after the evaluation”).
Hence I propose to introduce the shorthand root -E for this command. Thoughts?
Note: The -b could possibly be omitted from this discussion.
Note: Of course I can use a shell alias for this but this could be useful for people other than I as well
For fans of Root5:
Attached a little bash script which simulates the -e option of Root6.
Copy it to your bin directory, rename to rex5 and “chmod +x rex5”
Then you can do:
rex5 "sqrt(100)"
rex5 56.89*45./6
Dont forget the “” if the expression contains characters
eaten by the shell otherwise.
You see its pretty clumsy and probably not complete.