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
- Replies:
- Re: caget with an array of space-containing strings Eric Norum
- References:
- caget with an array of space-containing strings Carl Schumann
- Re: caget with an array of space-containing strings J. Lewis Muir
- Re: caget with an array of space-containing strings Ralph Lange
- Navigate by Date:
- Prev:
Re: caget with an array of space-containing strings J. Lewis Muir
- Next:
Re: caget with an array of space-containing strings Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: caget with an array of space-containing strings J. Lewis Muir
- Next:
Re: caget with an array of space-containing strings Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|