You can read in the first 500 elements like this:
data = ToExpression@ReadList["myfile.txt", Record, 500, RecordSeparators -> " "];
On Linux/OS X, items 500 to 1000 can be read in this way:
n = 500; m = 1000;
data =ReadList["!cat myfile.txt | tr ' ' '\n' | head -" <>
ToString@m <>" | tail -" <> ToString[m - (n - 1) ]];
Assuming your record separator is a space, and that you might want to ignore records which are not of the form, {...}, you could use the following to find records n through m:
n = 1; m = 500;
data = ReadList["!cat myfile.txt | tr ' ' '\n' | grep '{.*}' | head -" <>
ToString@m <> " | tail -" <> ToString[m - (n - 1) ]];
splitcommand in bash. i.e.split -l 500 data. Here's the man page. – canadian_scholar Nov 15 '12 at 14:59cat temp.dat | tr " " "\n" | split -l 500would be one of many Unix commands.sedwould also be a good bet. – cormullion Nov 15 '12 at 15:23