Easy way to copy drush vget variables from one site to another site? I have a bunch of vget variables to copy over to another dev site. What is an easy way to do this? I'm able save it to a file via "drush vget | ack var_name > myfile", but how would i do a drush vset using those variables saved in the file?
The problem here is that the output from a drush variable-get might be an array.  Drush can easily render arrays on output, but drush variable-set does not provide a feature that allows you to provide arrays as input.

The best you can do with array data is to use php-eval:

drush php-eval 'variable_set("var", array(...));'

How do you get the array value to insert in here, though?  Trying to do this directly from the drush variable-get output would be problematic; it would be very tedious to get all of the quoting and escaping right. I would not recommend this for your final solution.

Instead, you might consider using drush_invoke_process.  Something similar to this might work:

drush ev '$v = drush_invoke_process("@remote", "vget", array("var")); $data = $v["object"]; variable_set("var", $data);'

That would probably do the trick for you. However, rather than building up a custom solution to moving configuration from one site to another with Drush, I might recommend that you instead examine the ctools export bonus Drush extension. It can export and import variables nicely, and might ultimately be better suited to your purpose.