Escaping string for sending to command line or shell (and other uses)
In Ruby 1.9 the library Shellwords has some useful methods to help translate between the program and the command line interface. When sending strings to the cli, some characters are not well received as they are reserved for use by the shell program. To use the characters, you must escape them. This is where the Shellwords becomes useful.
Example to escape command with arguments
Example of splitting string with quotes embedded
This is pretty cool as I could see this being useful for just making an array from a string that contains a mix of text and quoted text