[Gambas-user] More Problems with SHELL (possible BUG).

Stefano Palmeri rospolosco at ...152...
Fri Jul 6 09:56:23 CEST 2007


Alle 09:18, venerdì 6 luglio 2007, audiossis ha scritto:
> Thanks Stefano for your suggestion but unfortunately I have to report that
> it made no difference. I should at this point mention that I have tried
> re-directing the output  of both "mkdir" and "cpio" by using code like:
>
> SHELL "mkdir -v /new/directory >/dev/stdout" WAIT FOR READ
>
> and
>
> SHELL "mkdir -v /new/directory >/dev/console" WAIT FOR READ
>
>
> Your suggestion made sense but I don't think that the problem lies with the
> direction (or lack thereof) of output from the shell programs but rather
> the content of their returns. I wonder if the output of these programs
> begins with a null character (or other non-printable character) that is
> confusing the "READ" argument? or if there is a timing problem that
> prevents "READ" from acquiring the first byte of returned data?
>
> Ben

You're right. I don't know. I tried with gambas 1.9.49:

PUBLIC SUB _new()
  
  SHELL "mkdir -v hello >&1 | head -c5" 
      
END

'head' doesn't work. Also

PUBLIC SUB _new()
  
  DIM sOutput AS String
  
  SHELL "mkdir -v hello >&1" TO sOutput
  PRINT sOutput
      
END
  
sOutput is blank. 

Very strange. Probably a bug(?).

Stefano

 





More information about the User mailing list