Closed

Very simple Perl Parser - repost 2

This project received 34 bids from talented freelancers with an average bid price of $46 USD.

Get free quotes for a project like this
Employer working
Skills Required
Project Budget
$30 - $250 USD
Total Bids
34
Project Description

The purpose is to parse two text files, and extract information from them to produce a new text file. The script is run as [url removed, login to view] TextFile1 TextFile2 > [url removed, login to view]
Both files are tab delimited text files. Examples are attached.

The only columns we are interested in from TextFile1 are:
Column 1, which is our “TickerName”.
Column 8, which is either “L” or “S”.

The only columns we are interested in from TextFile2 are:
Column 1: This is again our “TickerName”, but appended with the word “Stock”. If we remove the word “ Stock”, we have the same TickerNames in TextFile1 and TextFile2. However, as can be seen in the example above, TextFile1 can have multiple entries for a TickerName.

The [url removed, login to view] is exactly the same as TextFile1, except it has an additional column/field at the end of each row. This is generated in the following manner. If column 8 from TextFile1 is “S”, then the additional field corresponds to column 6 from TextFile2 for the appropriate ticker. For example, from the example above the first ticker is “ANV”, which has “S” in column 8. Therefore, we are interested in column 6 from TextFile2, which is “[url removed, login to view]”.
If Column 8 is “L”, then the additional field corresponds to column 7 for the appropriate ticker. For example, from the example above, the third ticker is “ARIA”, which has “L” in column 8. Therefore, we are interested in column 7 for this ticker from TextFile2, which is “[url removed, login to view]”.

The example above will therefore produce an output identical to the "[url removed, login to view]" example.

The script will produce error messages, for example:
- If the ticker is not found in TextFile2
- If the “L/S” field does not contain and “L” or “S”

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online