This kind of trick is great stuff. I don't even know how to categorize it. Well, "data science", of course, but this general kind of algorithmic sleight-of-hand is always attractive.
You would think this would be easy to find. I've got a string - perhaps taken from a file - that represents a command. I want to parse it into an ARGV-like structure, with proper string quoting and that kind of thing.
Here's a way to do it in C#: CommandLineParser.
Or you can get Windows to do it for you, from Perl.
Oh, right. Text::ParseWords. I knew I already knew the answer to this.
That ...
No comments:
Post a Comment