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  2009  2010  2011  2012  2013  <20142015  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  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: newline in IOCSH_PS1 value
From: Mark Davis <[email protected]>
To: Eric Norum <[email protected]>, [email protected]
Cc: "[email protected]" <[email protected]>
Date: Thu, 27 Feb 2014 09:16:09 -0500
I had tried the continued line approach (a '\' as the last character).  But all attempts to include a line break withing the string just results in an error:

##--- set IOC shell prompt ---
epicsEnvSet IOCSH_PS1, "\
st.cmd -- Line 200 -- Unbalanced quote.
mdlinux> "
st.cmd -- Line 201 -- Unbalanced quote.

I had not thought of setting a value before launching the IOC shell.  Unfortunately, it doesn't appear to pay any attention to the bash shell environment variables (excluding, of course, the standard ones the EPICS code itself requires, such as the EPICS_XXX ones, shown by the epicsParamShow command).

Now that I am looking for it, I am surprised that I have not been able to find even so much as a hint that commands in the IOC shell can make use of arbitrary environment variables that are set anywhere other than within the IOC shell itself (i.e. other than the special-case/standard ones).  I had assumed that this WAS possible, even if it required some command to do so.  But I have yet to find any command to due this, or any mention at all of some built-in way logic to support it).

Even more interesting is IOCSH_PS1 itself.  Although the epicsEnvSet command is used to set it, epicsEnvShow says it is NOT an environment variable:

epics> epicsEnvShow IOCSH_PS1
IOCSH_PS1 is not an environment variable.

(also not in the list shown if you just type epicsEnvShow)


Perhaps your examples require a newer version of EPICS?  (I am using R3.14.12.2)  But again, numerous Google searches have failed to turn up any document that mentions this one way or the other.


On 2/26/2014 4:54 PM, Eric Norum wrote:
You can set the variable outside the IOC:

>  export IOCSH_PS1="ABC
DEF> "
> ../../bin/darwin-x86/example st.cmd 
...
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncExample, "user=ericHost"
ABC
DEF>


And this seems to work inside the st.cmd file:

epicsEnvSet IOCSH_PS1 "ABC\
DEF> "


../../bin/darwin-x86/example st.cmd 
. . .
############################################################################
iocRun: All initialization complete
## Start any sequence programs
#seq sncExample, "user=ericHost"
ABC
DEF> 


On Feb 26, 2014, at 1:10 PM, Mark Davis <[email protected]> wrote:

Anybody happen to know of a way to include a newline in the IOCSH_PS1 value?


I can include one by manually typing the command in to the IOC shell after it is started:

epics>
epics> epicsEnvSet IOCSH_PS1 "      <---- Ctl+V, Ctl+J typed here....
becoladaq> "

becoladaq>

becoladaq>


But I cannot find any way to do this from the st.cmd startup script.  I have tried using "\n", hex, octal values, etc.  Nothing seems to work.


Mark Davis
NSCL/FRIB


-- 
Eric Norum
[email protected]






Replies:
Re: newline in IOCSH_PS1 value Eric Norum
RE: newline in IOCSH_PS1 value Mark Rivers
References:
newline in IOCSH_PS1 value Mark Davis
Re: newline in IOCSH_PS1 value Eric Norum

Navigate by Date:
Prev: Re: Monitoring whether an IP device is connected or not David Michel
Next: Re: newline in IOCSH_PS1 value Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: newline in IOCSH_PS1 value Eric Norum
Next: Re: newline in IOCSH_PS1 value Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·