On Thursday 26 February 2009 18:23:17 Ralph Lange wrote:
I have to admit, though, that arrays of strings with embedded spaces
break one of the command line tools' underlying ideas: caput
understands
the caget return value of the same PV.
So, an command line option to change the separator could be a
feasible
solution, or quoting those strings, or both. Any preferences?
Carl Schumann also wrote (privately):
Even as human I have trouble parsing the result. The PV is not
mine and so I don't really understand the strings I am looking at to
being with. The lack of an obvious separator complicates matters
further.
I agree that your particular example was pretty much impossible to
read, so we
should fix the tools.
How about we change ca{get,put,monitor} so that if they're printing
string
values (and ENUM choice strings) that contain spaces or other
characters that
need escaping for the shell, they enclose them in double-quotes?
I guess they should also escape control characters, and the rule
should
probably apply to PV names as well. Maybe we need an option to turn
this on
though?
A good Codeathon job, if you need one Ralph...
- Andrew
--
The best FOSS code is written to be read by other humans -- Harold
Welte