EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: caget with an array of space-containing strings
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: Ralph Lange <[email protected]>
Date: Fri, 27 Feb 2009 10:01:40 -0600
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  <20092010  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  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·