On Jul 24, 7:39 pm, [EMAIL PROTECTED] (Peng Kyo) wrote:
> On Fri, Jul 25, 2008 at 3:22 AM,  <[EMAIL PROTECTED]> wrote:
> > Greets Guys
>
> > Trying to Make a system from perl to use the sort.
>
> > # @args = ('c:\windows\system32\sort.exe "C\logs\"');
> > #     system(@args) == 0
> > #          or die "system @args failed:$?"
>
> rather than calling an external system commands, you should use Perl's
> built-in "sort" function, which expresses well under this case. see
> "perldoc -f sort" for helps.
>
> --
> Regards,
> Jeff. - [EMAIL PROTECTED]

So how would that work? Then end result is the joining of two log
files into one master file.

But because both of these log files are similar in terms of servers,
Users either get directed to one or the other.

So when I join both files, I want it sorted uniquely without losing
any data.
I was also toying around with this

my @args = (
  'c:\windows\system32\sort.exe',
  'xferlog.log',);
eval {
  system(@args)
};
if ($@) {
 "warn there was an error\n";
}

But this is the Unix Sort that I need

sort -Mk 2,2 -k 3,3n xferlog.??.nsun2 xferlog.??.nsun3 -o xferlog.??

Thats how Unix will sort it.

-Thanks


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to