Subject: |
Re: caget with an array of space-containing strings |
From: |
Eric Norum <[email protected]> |
To: |
tech-talk Techtalk <[email protected]> |
Date: |
Fri, 27 Feb 2009 10:11:58 -0600 |
I'd like to suggest that there also be an option to caget/caput that
makes them produce/accept 'comma separated value' strings compatible
with a spreadsheet.
I suspect that this might work acceptably with the shell, too, if you
temporarily did IFS="," and then did a 'set' on the caget output.
On Feb 27, 2009, at 10:01 AM, Andrew Johnson wrote:
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
--
Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793
- 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
- Re: caget with an array of space-containing strings Andrew Johnson
- Navigate by Date:
- Prev:
Re: caget with an array of space-containing strings Andrew Johnson
- Next:
EPICS drivers or an EPICS interface to lantronix Embedded Device server communicating over TCP/IP Sandeep Babel
- 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 Andrew Johnson
- Next:
Re: caget with an array of space-containing strings Andrew Johnson
- 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
|