Kris writes..

>QUESTION: how do I interact whith bash over several 
>statemants. Is there a way to interact whith it ?? Backticks 
>woun't work by the way. 

I don't know anything about the specifics of your situation, so I've
just jumped to the money question, hopefully this advice is still on
target.

Try IPC::Open2 which allows you to open a filehandle both for STDIN and
STDOUT to/from any command (including bash I presume). If you need
STDERR as well then IPC::Open3 will work a treat (be careful the STDIN
and STDOUT handle position in the parameter list switches between open2
and open3).

>I imagine a way like open the bash at skript startup, do all 
>my things line by line and close the bash at the end. But the 
>pipe thing do not work in this case- why, by the way ? Do I 
>have to terminate all strings in a special case ? \r\n ??? And 
>of cause: the next string (line) that has to be pased to the 
>bash have to run when the last is ready...

Dunno why, your strings should only need to be terminated in "\n" on
Linux. You should just be able to pump commands into a filehandle opened
with "| /path/to/bash", unless something's happening that you're not
expecting.

-- 
  Jason King
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to