Experimental Physics and Industrial Control System
Subject: |
ENVVAR.right_trim in IOC console |
From: |
"Jemian, Pete R. via Tech-talk" <[email protected]> |
To: |
EPICS Tech Talk <[email protected]> |
Date: |
Mon, 30 Sep 2019 01:35:31 +0000 |
Working in the IOC shell (EPICS base 7.0.3), how to remove the last
character from an EPICS environment variable?
given this definition: epicsEnvSet(PREFIX, "xxx:")
I want to achieve this result: "xxx" by somehow editing $(PREFIX) in place.
In bash, this is possible using ${PREFIX::-1} but in the IOC shell:
iocxxx> echo $(PREFIX::-1)
macLib: macro PREFIX::-1 is undefined (expanding string echo $(PREFIX::-1))
The context is I want to change this line from:
dbLoadRecords("some.db","IOCNAME=$(PREFIX)")
to:
dbLoadRecords("some.db","IOCNAME=$(PREFIX - 1 character)")
--
----------------------------------------------------------
Pete R. Jemian, Ph.D. <[email protected]>
Beam line Controls and Data Acquisition (BC, aka BCDA)
Advanced Photon Source, Argonne National Laboratory
Argonne, IL 60439 630 - 252 - 3189
-----------------------------------------------------------
Education is the one thing for which people
are willing to pay yet not receive.
-----------------------------------------------------------
- Replies:
- Re: ENVVAR.right_trim in IOC console Michael Davidsaver via Tech-talk
- Re: ENVVAR.right_trim in IOC console Till Straumann via Tech-talk
- Navigate by Date:
- Prev:
RE: RELEASE file Mark Rivers via Tech-talk
- Next:
Re: ENVVAR.right_trim in IOC console Michael Davidsaver via Tech-talk
- 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:
FW: error binding socket Alfio Rizzo via Tech-talk
- Next:
Re: ENVVAR.right_trim in IOC console Michael Davidsaver via Tech-talk
- 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