i want check for PVCS header in file if its present then check if its in proper format or not i want to do this is in perl on windows.
this is what i am doing :
1 . open file
2 . check for "PVCS information" if found then store the line no to $line var.
3 . check for "sccs" header
4 . if sccs header found then exit
5. close file
6 . if PVCS header found then call another subroutine with $line.
6.1 . again open the file skip lines till $line
6.2 . add 1 to $line and check for desired word
add 2 to $line and check for next word
.
.
6.3 . if header is in proper format then set a flag for each if statement and if all are set then return 0 or return 1 .
6.4 . close file.
now i am ready with small script for this ( which is in my office i will post it tomorrow ) but is there any better way of checking if PVCS header is in proper format or not ??
I have a Student File (rno, name, marks1, marks2, marks3)
How do I display a student with the highest percentage and with a percentage between 50-60.
and how to sort students in ascending order as per their name (1 Reply)
Hello,
I'm attempting to write a tool that checks an IP address for existing PTR records then if there are no PTR records does a ping to see if it response.
Then if there is no response, it should print a message saying
This is what I have so far.
#!/usr/bin/perl
$nxdomain =... (4 Replies)
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
Hi Perl Guru,
I'm new to Perl Programming & need some help.
I need to have some kind of similar code template so I can start to work on it.
I'm been reading some forums and did not find anything that are similar so I start to work on it. I've been struggling on how to start it.
Any... (1 Reply)
Hello all,
I'm sorry if this is answered elsewhere, I've used the search function and can't find the specifics of what I'm after.
I am brand new to playing with linux, and ideally I want to get better to help the company that I now work for.
What I want to do:
Create a script that I... (4 Replies)
Ok, so this may be an unusual request. But I have a certificate that expires sometime in may of 2011. Now, i have to monitor this certificate and alert when the current time is within 30 days of may 20, 2011.
#!/usr/bin/perl
#
use Time::Local;
#
$sec=59;
$min=59;
$hours=23;
$day=31;... (3 Replies)
Hi All,
I have a requirement to perform the following checks.
Input file is a "|" delimited file and looks like this.
A|c1|c2|c3|....
B|G1|G2|G3....
C|H1|H2|H3...
A|c4|c5|c6|....
B|G4|G5|G6....
C|H4|H5|H6...
Now the check is to see if all the "A" records have a corresponding B... (7 Replies)
Need to make a very fast file existence checker. Passing in 20-50K num of files
In the code below ${file} is a file with a listing of +20,000 files. test_speed is the script. I am commenting out the results of <time test_speed try>.
The normal "test -f" is much much too slow when a system... (2 Replies)
Hi,
I have a file abc.txt with data like this
1 /test/
2 /test/file.txt
3 /data/
4 /data/file1.txt
5 /data/file2.txt
I want to take out every path from the file and check if its a directory or file.
I am trying it with cut with something like this but it doesnt work
... (7 Replies)
I have a process that I am trying to provide a solution for and have hit a brick wall and would like some pointers in the right direction.
Basically on a daily basis a report is automatically generated in a CSV format (FIRST.CSV) which includes codes and amounts in the following format:
... (6 Replies)