comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDL> bug in SPAWN
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL> bug in SPAWN [message #3907 is a reply to message #3854] Wed, 29 March 1995 00:00 Go to previous messageGo to previous message
Serdar Manizade is currently offline  Serdar Manizade
Messages: 15
Registered: December 1994
Junior Member
I have seen behavior from SPAWN that may or may not have anything
to do with your problem. (I am now running IDL3.6.1a under Solaris2.3)
I was doing something like:
SPAWN,'ls *.dat', filelist
print,filelist
This would look fine on the screen, but then I would try:
openr,lun,/get,filelist(0)
and I would get a message saying file not found. A clue to the
problem was revealed by:
print,strlen(filelist)
filelist(0) was much longer than any of filelist(1:*). The problem
was due to the initialization of my shell that was created by SPAWN.
I had some non-printing characters that were used to set the
title of my X window etc. and these were being returned as the
start of the result returned to SPAWN in the variable filelist.
The proper solution would have been to make my shell start-up smart
enough to recognize that it was not running in an X window. The
quick solution (which is what I implemented) is to intercept the
undesired characters thus:
SPAWN,'date ; ls *.dat',filelist
filelist=filelist(1:*)

For other applications where I did not need the shell (for example
when I did not have any wildcards in my command), then SPAWN,/noshell
would also work.

I first experienced the problem after upgrading the OS and/or the
version of IDL, but I have forgotten the specifics-- it was over a
year ago.

good luck,
Serdar Manizade
NASA Wallops Flight Facility, Wallops Island VA, USA

Fergus Gallagher <F.Gallagher@nerc.ac.uk> wrote:
>
> I am using IDL 3.6.1 under solaris 2.3. When I try
>
> IDL> spawn,command,out
> IDL> print,'*'+out
>
> then the FIRST line of 'out' has the '*' missing. Closer inspection
> shows that there is an extra character 13 at the start of out(0).
>
> This does *not* occur using the same version of IDL under SunOs 4.1.3.
>
> Can anyone report the same effect under any other operating system?
>
> It is not clear to me whether the bug is in the OS or in IDL.
>
> Fergus
>
> CC: FPS IDL tech support
> Bill Thompson, GSFC
>
> =================================================
> | Fergus Gallagher |
> | Remote Sensing Applications Development Unit |
> | British National Space Centre |
> | Monks Wood |
> | Huntingdon PE17 2LS / UK |
> | |
> | F.Gallagher@nerc.ac.uk |
> | http://uh.nmt.ac.uk/bnsc/fgg.html |
> =================================================
>
>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Re:Student version of IDL
Next Topic: Re:Student version of IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 20:06:12 PDT 2025

Total time taken to generate the page: 0.24116 seconds