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

Subject: Re: iocsh and redirection
From: Eric Norum <[email protected]>
To: John Dobbins <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Date: Fri, 6 Dec 2013 09:40:41 -0800
As far as I know the IOC shell code was written with the intention that the scope of a redirection would be that of a single command only (like the first dbl redirect that you mention below).  The behaviour that you describe is clearly wrong, but I think is a result of the code missing an error test and report when attempting to redirect the output of an empty command.


On Dec 6, 2013, at 9:24 AM, John Dobbins <[email protected]> wrote:

> All,
> 
> I was experimenting with redirection in the iocsh and the results were not as I expected.
> 
> I have used commands like
> 
> dbl>records.txt
> 
> in the past and they work fine.
> 
> So I created an example IOC (makeBaseApp.pl -t example) and tried:
> 
> epics> 1>test.txt
> epics> dbl
> 
> and got:
> 
> Can't open "": No such file or directory.
> 
> the file test.txt was created but was empty.
> 
> Running the same test on another computer might produce
> 
> epics> 1>test.txt
> epics> dbl
> Can't open "ØîØð8": No such file or directory.
> 
> again test.txt is created but empty.
> 
> 
> And interestingly on a third computer
> 
> epics> 1>test.txt
> epics> dbl
> 
> will create test.txt but will output a list of records to a file named "èþ8Þ"
> 
> 
> 
> BTW, I was playing with this because I wanted to redirect stderr to a file. The App Developer Guide mentions epicsStdioRedirect and I was wondering what it would take to get redirection to work in any specific IOC.
> 
> 
> 
> Regards and thanks,
> 
> John Dobbins
> Cornell University
> 
> 
> 

-- 
Eric Norum
[email protected]






References:
iocsh and redirection John Dobbins

Navigate by Date:
Prev: iocsh and redirection John Dobbins
Next: RE: iocsh and redirection Heesterman, Peter J
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: iocsh and redirection John Dobbins
Next: RE: iocsh and redirection Heesterman, Peter J
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·