LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-18-2004, 07:36 PM   #1
dannyp
LQ Newbie
 
Registered: Mar 2004
Location: Philadelphia, PA
Posts: 14

Rep: Reputation: 0
Help with Perl Script


Hello,


I need help figuring out how to do the following, I am very new to Perl.

I am on a unix box, I have a directory that has an unknown amount of files in it. The files are listed in the following format. (date)_01day, 07day,30day.

So I have the folowing for 7/18.

040718_01day
040718_07day
040718_30day

Inside the files are a list of Mac addresses in order, ex:
00:02E:81:F7:06
00:02E:81:F7:07

What I need to do is take the last 7 days worth of the _01day files and compare each file so that only the Mac addresses that showed up in all 7 files are outputed to a new file called date_07day.

Then I also need to do the same for the last 30 days of files, and output it to a new file called date_30day. Any help is greatly appreciated.

I want to be able to do this everyday, so the filenames will keep changing date wise.

If possible i would like to be able to, from the command line type:

nameofperlscript 040718_01day and have it compute all of the above counting the 18th as the 1st day of 7 and 30.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
please help .perl Script/ apenguinlinux Programming 4 08-10-2005 09:04 PM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
how to find the pid of a perl script from shell script toovato Linux - General 1 12-19-2003 06:25 PM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 05:03 AM
perl script... killjoy Programming 0 03-29-2001 03:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration