User Profile

Collapse

Profile Sidebar

Collapse
lalnamar
lalnamar
Last Activity: Jul 17 '07, 06:47 PM
Joined: Jul 17 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • lalnamar
    replied to How to capture output of unix time command?
    in Perl
    Comment out line 5 of scratch2.pl and run the program. The output is:

    real 2.00
    user 0.00
    sys 0.00

    Alternatively, add the line - print $x; - to scratch2.pl and run the program (now we are printing $x twice). The output is:

    real 2.00
    user 0.00
    sys 0.00
    Hello world
    Goodbye World
    Hello world
    Goodbye World

    In other words, the timing information...
    See more | Go to post

    Leave a comment:


  • lalnamar
    replied to How to capture output of unix time command?
    in Perl
    when i type in "time command " at the command line i get the following:

    ...
    lines of output
    ....
    real 0.5
    user 0.4
    sys 0.0

    I want to store ALL the above output in a file (using a perl script). When i try to do this, i am only able to store the "lines of ouput" part. I am unable to store those last three lines, and i cant figure out why I am unable to.
    See more | Go to post

    Leave a comment:


  • lalnamar
    started a topic How to capture output of unix time command?
    in Perl

    How to capture output of unix time command?

    I want to execute a unix time command using perl, and capture the output (specifically, the time it takes the command to execute).

    i tried using the system command:
    system("time command ");
    however, when i try to capture the output, the capture output does not contain the amount of time it took to execute

    when i try to do:
    $var = `time command `;
    there is the same problem (the ouput...
    See more | Go to post
No activity results to display
Show More
Working...