standard way to parse command line from a string
-
Hi all! Is there a way to parse command line options from a string/file? I'd prefer a standard library that works on Linux, but if there is some way to do it from boost or some other library please let me know. Please note that I'm NOT talking about command line arguments that are passed to the main function (argv), instead the complete cmdline is saved in a file. Thanks alot!
-
Hi all! Is there a way to parse command line options from a string/file? I'd prefer a standard library that works on Linux, but if there is some way to do it from boost or some other library please let me know. Please note that I'm NOT talking about command line arguments that are passed to the main function (argv), instead the complete cmdline is saved in a file. Thanks alot!
If you really need a flexible thing, then have a look at Lua[^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]modified on Monday, June 27, 2011 4:09 PM
-
Hi all! Is there a way to parse command line options from a string/file? I'd prefer a standard library that works on Linux, but if there is some way to do it from boost or some other library please let me know. Please note that I'm NOT talking about command line arguments that are passed to the main function (argv), instead the complete cmdline is saved in a file. Thanks alot!
Whether you pulled the string from a file or from the command line, it'd be parsed in the same fashion.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
-
Hi all! Is there a way to parse command line options from a string/file? I'd prefer a standard library that works on Linux, but if there is some way to do it from boost or some other library please let me know. Please note that I'm NOT talking about command line arguments that are passed to the main function (argv), instead the complete cmdline is saved in a file. Thanks alot!