#!/usr/bin/ksh
Count=0
Limit=30
while [ $Count -lt $Limit ] ;
do
Count=$(($Count + 1))
sleep 1
echo $0 has Slept for \[$Count\] Seconds so Far...
done
####
#!/usr/bin/perl
use strict;
use warnings;
my @Types = ('A', 'B');
my %ScriptName;
my %IsFinished;
my %ProcesseHandle;
foreach my $Type (@Types)
{
$ScriptName{$Type} = $Type . '.ksh';
$IsFinished{$Type} = 0;
if(!open($ProcesseHandle{$Type}, "$ScriptName{$Type}|"))
{
WarnLog("Unable to run Script:[$ScriptName{$Type}]:\n$^E:\n$!:\nError Number $?:$@ ");
}
}
while(!$IsFinished{'A'} or !$IsFinished{'B'})
{
my %Line;
foreach my $Type (@Types)
{
if(!$IsFinished{$Type})
{
$Line{$Type} = <$ProcesseHandle{$Type}>;
if(!defined($Line{$Type}))
{
$IsFinished{$Type} = 1;
}
print("\[$Type\]\[$Line{$Type}\]\n");
}
}
}
####
[A][GLOB(0x2ae38)]
Use of uninitialized value in concatenation (.) or string at HashPipe.pl line 33.
[B][]
[A][GLOB(0x2ae38)]
Use of uninitialized value in concatenation (.) or string at HashPipe.pl line 33.
[A][]