MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

ReadList with system command problem ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110667] ReadList with system command problem ?
  • From: pitooon <pitooon at gmail.com>
  • Date: Thu, 1 Jul 2010 08:27:34 -0400 (EDT)

Hello everyone,

I am facing a problem that i am unable to trace/undestand.

Using Mathematica 6.0 on MacOS, the following "simple" cell evaluation
gets stalled at different files every times.


fileslist =  ReadList["some_list_of_files", String];
Do[
  filein = fileslist[[i]];
  a = ReadList[
    "!perl -ne 'if ($_ =~ /^#/) {$a = 1} elsif ($a == 1) {$_ =~ \s/^(.
+):(.*)$/$2/;print}' " <> filein, Number, RecordLists-> True];
  , {i, Length[fileslist]}
];

Looping over  2 or 3 files is ok, but higher iteration numbers lead to
kernel being stucked ( this number changes at each evaluation tries
that i made, sometimes 8, 15 ...)

All files have the same format and all perl commands are succeesfull
when launched individually on each file.
Obviously, i m missing a big point here.

Any clue/links/ way of tracing ?

Thanks for reading,



  • Prev by Date: Re: Sum of terms --> list
  • Next by Date: Expression for manipulate controls
  • Previous by thread: Re: Sum of terms --> list
  • Next by thread: Expression for manipulate controls