<div dir="ltr">originally i was to grep a configuration file..later due the complicated process changed to a cat .. an then due the inherent problems of make a complicated process use directo EXEC "commando" to Variable... <div><br></div><div>now my code evoluted to "File.Load("somefile")</div><div><br></div><div>HOLY SHIT! !!! that's not was that i want! X-D</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie., 10 de ene. de 2020 a la(s) 15:42, Tobias Boege (<a href="mailto:taboege@gmail.com">taboege@gmail.com</a>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Fri, 10 Jan 2020, T Lee Davidson wrote:<br>
> On 1/10/20 11:38 AM, PICCORO McKAY Lenz wrote:<br>
> > i have a code where i want to pass content to main.. but i never raised the content:<br>
> > cadena only are filled with content after main raises end, why .. if i not use shell?<br>
> > i attached the project<br>
> > <br>
> > i have a class and a module main, class are:<br>
> > <br>
> > Public cadena As String = "ver"<br>
> > Public linea As Collection<br>
> > Private lineas As String[]<br>
> > <br>
> > Public Sub Main()<br>
> > Exec ["cat", "/etc/courier/authdaemonrc"] For Read As "Processo"<br>
> > End<br>
> <br>
> Perhaps because you didn't tell the interpreter to "Wait" for the command to finish before continuing on?<br>
> <br>
> If you're simply trying to get the contents of "/etc/courier/authdaemonrc"<br>
> for parsing, then why not just retrieve it into a string variable and then<br>
> parse it without bothering with Process_Read()?<br>
> <br>
> For example:<br>
> Exec ["cat", "/etc/courier/authdaemonrc"] to cadena<br>
> lineas = Split(cadena, gb.NewLine, "", True)<br>
> For a = 0 To lineas.max<br>
> ...<br>
> Next<br>
> <br>
<br>
`cat some-file` is also built into Gambas as `File.Load("some-file")`.<br>
<br>
-- <br>
"There's an old saying: Don't change anything... ever!" -- Mr. Monk<br>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
</blockquote></div>