[Gambas-user] Exec statement not working though equivalent Terminal command works

Tobias Boege taboege at ...626...
Thu Jul 10 12:15:11 CEST 2014


On Thu, 10 Jul 2014, John Rose wrote:
> Fabien & Tobias,
> 
> I previously asked this question
> 
> Exec ["mplex", "-f", "8", "-o",  sCombinedPath , sVideoPath, sAudioPath]
> works provided that none of the paths contains a space.
> 

It should work either way. Look at this script

--8<-- [ t.gbs3 ] --------------------
#!/usr/bin/gbs3

Public Sub Main()
  Exec ["cat", "-n", "/tmp/some file"]
End
--8<----------------------------------

and how it works:

$ echo test >"/tmp/some file"
$ ./t.gbs3
     1  test

So either it's a problem with mplex, with your surrounding program, with
your judgement that the command fails or something else. None of which I
can test. (Or indeed your copy of Gambas has a broken Exec which I doubt.)

Try to reproduce the problem with spaces in the file name with other
programs, like cat which everybody has and knows to use.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list