Search Results

Search: Posts Made By: subhap
15,666
Posted By subhap
perl how to exit a while loop and quit reading the input file
I am reading a file using While loop

while <FILE>
{
$_ = <FILE>;
process data...

}

I would like to quit reading the file once I encounter a String pattern. How do i do it.

is it...
19,252
Posted By subhap
PERL: reading 2 column data into Hash file
I am trying to read in a 2 column data file into Perl Hash array index. Here is my code.

#!/usr/bin/perl -w
use strict;
use warnings;

my $file = "file_a";
my @line = ();
my $index = 0;
my...
2,854
Posted By subhap
Perl script to toggle through dates by week
Hi,
I need help to toggle through dates on a weekly basis to be fed into a script as inputs. The format should be: yyyy/mm/dd (start) yyyy/mm/dd (end), where end date is 7 days increments.
...
3,484
Posted By subhap
Sorry about the confusion.. here is the details....
Sorry about the confusion.. here is the details. My script generates data every 20 minutes.

File #1
USER maria
RUN 5
WAIT 6
DONE 7
QUEUE short
TOTAL 10

USER bob
RUN 7
WAIT 3
DONE 2...
3,484
Posted By subhap
Thank you.. however for example in my Data.. I...
Thank you.. however for example in my Data.. I have several instances of say USER or WAIT on many lines and want data on those lines to be unique.

USER bob
WAIT 20
RUN 3
DONE 3

USER maria...
3,484
Posted By subhap
Writing out 2nd column into one file from multiple files
I have several files that are being generated every 20 minutes. Each file contains 2 columns. The 1st column is Text, 2nd column is Data.

I would like to generate one single file from all these...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy