In Progress

Perl Script that will read an input file and create two new files based on the data from the first file

Need a perl script written that will do the following:

1. Read a text file

2. Based on data in this file write to two new text files.

3. It must allow for variable file names. So I would run the script like... perl [url removed, login to view] [url removed, login to view] [url removed, login to view] [url removed, login to view]

4. No data loss from the input file... All data from the input file will go in either of the Output files or Both Files.

5. Spacing and tabs need to remain in place. No loss of formatting.

6. Basically, read a line, write the same exact line to one or both of the output files.

NOTES:

This log file is a trace of some directory based events. It has XML in the events and the spacing and tabs of these xml text must not change.

Each line in the input file will be one of these kinds of lines. On the lines with the TIMESTAMP, anthing after the second ":" is just data.

The TIMESTAMP can be many formats and styles. Sometimes it has a colon in it sometimes it does not.

TIMESTAMP:NAME ST:DATA

TIMESTAMP:NAME PT:DATA

TIMESTAMP:NAME :DATA

XML Nodes or attributes.

JUST DATA and not XML nor part of the ST or PT lines

See attached files for example

PSEUDOCODE

Read line of input doc

Save in a variable if the line contains a "ST:" or "PT:" or ":"

If line contains a "TIMESTAMP:SomeData ST:"

Then Write line to [url removed, login to view]

If line contains an "TIMESTAMP:SomeData PT:"

Then Write line to [url removed, login to view]

If line contains just a ":" (So no ST: or PT:) or if it say "EV:"

Then Write line to both Files

If line contains XML data

Then read the variable (ST: or PT:) and write all the XML data to the appropriate output file.

(So if a line is read that contains then read the variable for PT: or ST: and write the line including formatting to the appropriate output file)

(Each subsequent xml data line must be then written to the same file until a new line is read that has a "PT:" "ST:" or just ":" in it.)

If the line is just data or is a blank line and does not have any ST: PT: single colon, or XML data

Then do same as if XML data. Read variable and write to the appropriate file.

See files attached for samples.

For someone who knows perl really well, this should be a pretty easy script.

Thanks for bidding.

Skills: Perl

See more: perl script read file data, will do it, c read example, c# read and write text file, attached files, Pseudocode, log files, ev, create two, perl change file, perl script file, change text file, save file directory, read lines, read write xml, xml trace file, tabs create, data xml, save file name, output trace file, perl log, perl output, log file, write nodes, perl script input

About the Employer:
( 9 reviews ) Provo, United States

Project ID: #4800902

Awarded to:

agaved

I program in Perl since 1995, I have a PhD in Computer Science. I am not interested in money but in trying out Freelancer that is new to me.

$25 USD in 3 days
(0 Reviews)
0.0

18 freelancers are bidding on average $29 for this job

gangabass

I'm number one Perl developer here. See my PM for details.

$33 USD in 0 days
(139 Reviews)
5.9
idleswell

Hello, I am an experienced Perl scripting expert prepared to create this script for you. The script will accept your data file and partitition data into 2 output files according to the criteria given. A IDLER

$32 USD in 3 days
(98 Reviews)
5.6
lepoitr

I'm interested. I'm experienced(15+) perl web developer and linux administrator.

$34 USD in 1 day
(13 Reviews)
5.4
techvolcano

Interested.

$30 USD in 3 days
(26 Reviews)
4.4
PerlIsFun

I'd be glad to help. You haven't mentioned OS and/or Perl version that you want to use; it also would be good to know if you can rely on available (and sometimes recommended) CPAN modules.

$30 USD in 3 days
(10 Reviews)
4.1
denep

It's straightforward. You don't need any CPAN modules for this.

$35 USD in 3 days
(12 Reviews)
3.6
mccheung

Hello, I'm 3 years perl programer!! Thanks!!

$25 USD in 3 days
(2 Reviews)
3.2
blueCat1301

Please see private message

$35 USD in 3 days
(4 Reviews)
3.1
mythuat66

I can do it

$30 USD in 3 days
(1 Review)
3.1
adaschevici

Hello. I am an experienced developer. I have been working mostly in python but perl and python are closely related so this is no stretch. Please check pmb for further questions. Regards, Arthur.

$34 USD in 3 days
(1 Review)
2.8
sandervandijk

I can get this to you in no time. Please see my PM

$30 USD in 1 day
(2 Reviews)
1.0
puzzles

Hi i have two years experience in perl And i can do this work....

$35 USD in 5 days
(0 Reviews)
0.0
JulianRadev

Hello. I can do the task. No problem to run in Windows also.

$30 USD in 2 days
(0 Reviews)
0.0
kethseeyalusha

Hi, I will be able to write the script for you.I have 5 + years experience in Perl [url removed, login to view] forward to hear from you. Thanks, Kethseeyalusha

$20 USD in 2 days
(0 Reviews)
0.0
vw8168663vw

Hey i can give you exact format in which you are expecting.

$25 USD in 3 days
(0 Reviews)
0.0
zkutch

Hello. More 20 years programming experience.

$25 USD in 0 days
(0 Reviews)
0.0
kartikprmr

Hi, Consider it done. I have over 2 years of experience in perl. Thanks.

$15 USD in 0 days
(0 Reviews)
0.0