Results 1 to 6 of 6
February 18th, 2003, 07:13 AM #1
Looking at the TigerDirect DataFeed for the first time ...
Excel loads the file one record per line
Text editor loads the file one record per line
My Perl script loads the whole file into one line of a list.
This has stopped me in my tracks as I've never had to use anything other than very simple code to load a raw file into a list:
LOL - I must be using that in a dozen different scripts so it's come as a real blow when it doesn't work here.
(thinks of something ... scurries off ... returns)
Mmmmh - I downloaded the feed, loaded it into my text editor and saved it back out again, then uploaded it. That works - so there must be something at least slightly unusual terminating the rows.
I really don't want to have to process this manually - anyone come across this or have any bright perl ideas to account for it?
Are you Crazy?
February 18th, 2003, 08:15 AM #2
You may have to convert the line endings from Windows to UNIX or vicey-versa.
A tool I use alot to convert files is 'flip' (on my Linux and Solaris machines).
It's in the standard distribution packages in Debian GNU/Linux Woody release and is GPL, RPMs can be found here for Redhat and Mandrake.
February 18th, 2003, 09:34 AM #3
Ffoc - I think you're right. Presumably this is Windows style by default. Need to find out if/why that's the case - seems to me that Unix style files transfer to Win better than the other way round.
Thanks for the pointer to "flip". I'll follow up on that util as I'll no doubt need it some time, even if I get this changed.
Are you Crazy?
February 18th, 2003, 04:24 PM #4
It's because one is bloated and has everything under the sun installed in it by default (and does none of them particularly well), whereas the other has separate, discreet tools for everything you could imagine (and each of those tasks have been honed to a razor-perfection).
And, scuse my exaggerating.
March 23rd, 2003, 10:03 AM #5
- Join Date
- January 18th, 2005
If you're working with the feed on unix/linux then do this:
tr '\015' '\n' < feed.txt > newfeed.txt
That will create a new file called newfeed.txt with one record per line. Works for me.
March 23rd, 2003, 12:24 PM #6
By matt j in forum Commission Junction - CJReplies: 0Last Post: December 12th, 2006, 04:18 PM
By jerseyjim in forum Midnight Cafe'Replies: 0Last Post: May 3rd, 2005, 11:02 PM
By speedcreed in forum Cusimano.com ScriptsReplies: 1Last Post: August 21st, 2003, 09:50 AM
By Haiko de Poel, Jr. in forum Midnight Cafe'Replies: 36Last Post: August 24th, 2002, 01:14 PM