At Mon, 20 Jun 2011 15:43:12 +1000, AP wrote: > > On Mon, Jun 20, 2011 at 01:09:25AM +0900, MORITA Kazutaka wrote: > > > Presumably we do ' ' -> '\ ' and '\' -> '\\' so shell read will do the > > > right > > > thing. Can vdi names also contains tabs and newlines? If so, I should > > > probably quote those too, though I don't think shell convention defines a > > > sensible way to backslash-quote a newline does it? > > > > I don't know the way to include tabs or newlines into a program > > argument string. I think it is enough to handle only ' ' and '\'. > > Hit ctrl-v and tab (or ctrl-i) or ctrl-v and enter (ctrl-m). > > Also, in bash at least $'\t' works for tabs and $'\n' for enter and it > does other escape codes.
Thanks for the information. > > Best to escape non-printables, regardless of what they are. Less suprises > that way (taking care of utf-8 fun :). > > The other possibility is not to allow nul in the data and use \0 as the > seperator. Chris wrote a patch which uses space and newline as the separators, and it looks the most straightforward format to me: https://github.com/collie/sheepdog/commit/b9859febe93d26ff3decc217f4f9ac460fd61439 Let's discuss again if another patch is posted for this. :) Thanks, Kazutaka -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
