I am looking for an alternative to the python shlex.split() function for Powershell.
Google has not helped me so far.
In case you do not know what this function does, it allows you to split a string into a list of multiple “fields” but excluding quoted substrings.
For example:
The following string:
I have “no inspiration” for this
would be split the following way:
I, have, no inspiration, for, this
The reason I want to switch to powershell for this is to avoid having to install python on our production windows servers.
Thanks in advance
you should perhaps instead search for
awk powershellwhich leads to
http://windows-powershell-scripts.blogspot.de/2009/06/awk-equivalent-in-windows-powershell.html