Best way to parse shell style (VAR=value) configuration files I have a string `GRUB_CMDLINE_LINUX="quiet rhgb crashkernel=auto"` which is pretty much shell style variable assignment. I need to process this string so I can extract string within the quotes  `quiet rhgb crashkernel=auto` and then split the options into an array.

I do it this way:

    line = 'GRUB_CMDLINE_LINUX="quiet rhgb crashkernel=auto"'
    kernel_opts = line.match(/"(.*)"/).to_s.delete('"').split(' ')

Is there a leaner way to do it?

Is there a way in Ruby to load shell style configuration files naively (without processing them as strings)?