{
revision:1,
roundLotSize:1,
instrRegistry:"ABCDEFG0XXX",
tradedCurrency:"EUR",
priceType:"PER_UNIT",
activationTime:0123456000000,
inactivationTime:01234500000,
publicationTime:123456000000,
unpublicationTime:12345600000,
xml:"@ORDERBOOK_ID@XXXX XXXXXCH0000012345Gearing Certificate Select Dividend Basket, 2008-20132012-07-02T17:48:42RWXXXXEURUNIT12008-05-16ABC DEXXXABCDEFG0XXXCHDummy Country xxABCDEFG0XXX93Dow Jones STOXX Select Dividend 30 Index0.252470.28Dow Jones U.S Select Dividend Price Index0.25429.62Dow Jones Asia/Pacific Select Dividend 30 Index0.25282.23Dummy Name Country Select Dividend Index0.251000C2013-01-012013-01-012013-01-01Some broker",
marketId:"XXXX",
marketSegmentId:"ABCD",
attribs:{SURVEILLANCE_DATA_CHANNEL_ID:"SD#1",MARKET_SERVER_ID:"MS#1",MARKET_DATA_CHANNEL_ID:"MD#5"},
tickRules:"[100:100:inf]",
altIds:{ISIN:"CH000001234", EXCHANGE_SYMBOL:"XXXX XXXXX", SECONDARY_MARKETPLACE_ASSIGNED_IDENTIFIER:"123456"}
},
{
...
},
####
### we found this : XXX
{
revision:1,
roundLotSize:1,
instrRegistry:"ABCDEFG0XXX",
tradedCurrency:"EUR",
priceType:"PER_UNIT",
activationTime:123456000000,
inactivationTime:12345600000,
publicationTime:123456000000,
unpublicationTime:13624800000,
xml:"@ORDERBOOK_ID@XXXX XXXXXCH0000012345Gearing Certificate Select Dividend Basket, 2008-20132012-07-00T00:00:00RWXXXXXXXUNIT12008-05-16ABC DEXXXABCDEFG0XXXCHDummy Country OyABCDEFG0XXX93Dummy STOXX Select Dividend 30 Index0.252470.28Dummy U.S Select Dividend Price Index0.25100Dummy Country/Pacific Select Dividend 30 Index0.25100.00Dummy Country Select Dividend Index0.25100.00C2013-01-012013-01-012013-01-01Some broker",
marketId:"XXX",
marketSegmentId:"ABCDE",
attribs:{SURVEILLANCE_DATA_CHANNEL_ID:"SD#1",MARKET_SERVER_ID:"MS#1",MARKET_DATA_CHANNEL_ID:"MD#5"},
tickRules:"[100:100:inf]",
altIds:{ISIN:"CH000001234", EXCHANGE_SYMBOL:"XXXX XXXXX", SECONDARY_MARKETPLACE_ASSIGNED_IDENTIFIER:"123456"}
},
####
#!/usr/bin/perl
use strict;
use warnings;
use File::Basename;
use Text::ParseWords;
if ($#ARGV == 0) {
open my $file, "<", $ARGV[0] or die "Couldn't open file '$ARGV[0]': $! \nDid you specify a valid file?";
my ($SYMBOL);
while (<$file>) {
$SYMBOL = s%.*%%s;s%.*%%s; ## this is'nt obviously working ...### but this is what I want to achieve
print "NEWCOLUMN:\"$SYMBOL\"\n";
}
}
} else {
print "You need to specify an input file \n";
print "\n";
print "They are usually located here : \n";
print "/PATH/* \n";
print "\n";
print "Usage : ".basename($0)." difffile.txt \n";
print "\n";
exit;
}