atu has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
I have a question:
I am running two scripts lets assume they are named script1 and script2.
In a solaris machine i am running script1 with a few arguments and it is calling script2 with information derivered from these:
Script1: { ....do stuff. `script2 a b c`; ... do more stuff }
and script2 has something like that:
Script2: { ....do stuff. print a lot of information about some tables in the database, update them, drop them and so on. ... do more stuff }
now if i run script2 from unix terminal it will spam screen with information related to tables on the database, print a lot of traces such as;
Working on table1: changing A to B: dropping table2: table dropped:
and so on, it keeps doing that for may be 4-5 minutes and prints a few lines on the terminal for every few seconds.
I want it to still do this when i call it from script1 but when i just use `script2 a b c`; screen looks like it is frozen, when i check DB i can see it is changing the tables but there are no traces on it.
When i call it as following from script1:
my $string = `script2 a b c`; print "\n $string \n";
This time screen again looks frozen and after script2's work is done (about 4-5 mins later) it suddenly prints all the info at onece, and thats bad, how can i call it so that string2 is outputting the traces on the screen but not the $string variable?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Script outputs on screen
by toolic (Bishop) on Oct 24, 2013 at 16:54 UTC | |
by atu (Novice) on Oct 24, 2013 at 18:37 UTC | |
|
Re: Script outputs on screen
by oiskuu (Hermit) on Oct 24, 2013 at 17:52 UTC |